diff --git a/drivers/auxiliary/joystickdriver.cpp b/drivers/auxiliary/joystickdriver.cpp index 767cea9fec..fa2ffd3e3e 100644 --- a/drivers/auxiliary/joystickdriver.cpp +++ b/drivers/auxiliary/joystickdriver.cpp @@ -237,12 +237,12 @@ const char *JoyStickDriver::getName() return name; } -__u32 JoyStickDriver::getVersion() +uint32_t JoyStickDriver::getVersion() { return version; } -__u8 JoyStickDriver::getNumOfJoysticks() +uint8_t JoyStickDriver::getNumOfJoysticks() { int n_joysticks = axes / 2; @@ -255,12 +255,12 @@ __u8 JoyStickDriver::getNumOfJoysticks() return n_joysticks; } -__u8 JoyStickDriver::getNumOfAxes() +uint8_t JoyStickDriver::getNumOfAxes() { return axes; } -__u8 JoyStickDriver::getNumrOfButtons() +uint8_t JoyStickDriver::getNumrOfButtons() { return buttons; } diff --git a/drivers/auxiliary/joystickdriver.h b/drivers/auxiliary/joystickdriver.h index 86493ee62c..f102101f30 100644 --- a/drivers/auxiliary/joystickdriver.h +++ b/drivers/auxiliary/joystickdriver.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -80,10 +81,10 @@ class JoyStickDriver void setPoll(int ms); const char *getName(); - __u32 getVersion(); - __u8 getNumOfJoysticks(); - __u8 getNumOfAxes(); - __u8 getNumrOfButtons(); + uint32_t getVersion(); + uint8_t getNumOfJoysticks(); + uint8_t getNumOfAxes(); + uint8_t getNumrOfButtons(); joystick_position joystickPosition(int n); bool buttonPressed(int n); @@ -110,9 +111,9 @@ class JoyStickDriver int joystick_fd; js_event *joystick_ev; joystick_state *joystick_st; - __u32 version; - __u8 axes; - __u8 buttons; + uint32_t version; + uint8_t axes; + uint8_t buttons; char name[256]; char dev_path[256]; int pollMS; diff --git a/libs/indibase/webcam/pwc-ioctl.h b/libs/indibase/webcam/pwc-ioctl.h index 5debf78e34..969c25ecfb 100644 --- a/libs/indibase/webcam/pwc-ioctl.h +++ b/libs/indibase/webcam/pwc-ioctl.h @@ -51,13 +51,7 @@ #pragma once -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) -#include -#else #include -typedef uint16_t __le16; -typedef uint8_t __u8; -#endif /* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 @@ -311,9 +305,9 @@ struct pwc_table_init_buffer struct pwc_raw_frame { - __le16 type; /* type of the webcam */ - __le16 vbandlength; /* Size of 4lines compressed (used by the decompressor) */ - __u8 cmd[4]; /* the four byte of the command (in case of nala, - only the first 3 bytes is filled) */ - __u8 rawframe[0]; /* frame_size = H/4*vbandlength */ + uint16_t type; /* type of the webcam */ + uint16_t vbandlength; /* Size of 4lines compressed (used by the decompressor) */ + uint8_t cmd[4]; /* the four byte of the command (in case of nala, + only the first 3 bytes is filled) */ + uint8_t rawframe[0]; /* frame_size = H/4*vbandlength */ } __attribute__((packed)); diff --git a/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.cpp b/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.cpp index af41430e5a..a8b0313581 100644 --- a/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.cpp +++ b/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.cpp @@ -538,7 +538,7 @@ void V4L2_Builtin_Decoder::setformat(struct v4l2_format f, bool use_ext_pix_form allocBuffers(); } -__u32 V4L2_Builtin_Decoder::getFormat() +uint32_t V4L2_Builtin_Decoder::getFormat() { return fmt.fmt.pix.pixelformat; } diff --git a/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.h b/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.h index d59c0f2a39..471b77ce5f 100644 --- a/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.h +++ b/libs/indibase/webcam/v4l2_decode/v4l2_builtin_decoder.h @@ -24,6 +24,7 @@ #include "v4l2_decode.h" +#include #include class V4L2_Builtin_Decoder : public V4L2_Decoder @@ -44,7 +45,7 @@ class V4L2_Builtin_Decoder : public V4L2_Decoder virtual void resetcrop(); virtual void usesoftcrop(bool c); virtual void setformat(struct v4l2_format f, bool use_ext_pix_format); - virtual __u32 getFormat(); + virtual uint32_t getFormat(); virtual bool issupportedformat(unsigned int format); virtual const std::vector &getsupportedformats(); virtual void decode(unsigned char *frame, struct v4l2_buffer *buf, bool native);