Commit 3b22a604 authored by Nicolas Dufresne's avatar Nicolas Dufresne
Browse files

v4l2: Properly fix Android build

The previous patch did not even compile on any possible platform or C
standard. That commit also didn't have a proper commit message.

Android ships Linux with a different signature for ioctl. They first
released an ioctl with int as request type, and later "fixed" it by
adding an override with unsign, which is still not matching Linux and
BSD implementation which uses unsigned long int.
parent 0e2d0ada
...@@ -71,9 +71,9 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object); ...@@ -71,9 +71,9 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
/* On Android NDK r18b the ioctl() signature uses 'unsigned' instead of /* On Android NDK r18b the ioctl() signature uses 'unsigned' instead of
* 'unsigned long' for the 2nd parameter */ * 'unsigned long' for the 2nd parameter */
#ifdef __ANDROID__ #ifdef __ANDROID__
typedef ioctl_req_t unsigned typedef unsigned ioctl_req_t;
#else #else
typedef ioctl_req_t gulong typedef gulong ioctl_req_t;
#endif #endif
#define GST_V4L2_WIDTH(o) (GST_VIDEO_INFO_WIDTH (&(o)->info)) #define GST_V4L2_WIDTH(o) (GST_VIDEO_INFO_WIDTH (&(o)->info))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment