Commit 29c35709 authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by Tim-Philipp Müller
Browse files

v4l2: Fix type compatibility issue with glibc 2.30

From now on, we will use linux/types.h on Linux, and use typedef of the
various flavour of BSD.

Fixes #635
parent 2cb9cd14
Pipeline #55397 failed with stages
in 35 minutes and 25 seconds
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
#ifndef __TYPES_COMPAT_H__ #ifndef __TYPES_COMPAT_H__
#define __TYPES_COMPAT_H__ #define __TYPES_COMPAT_H__
#ifdef __linux__
#include <linux/types.h>
#include <asm/ioctl.h>
#else /* One of the BSDs */
/* From linux/types.h */ /* From linux/types.h */
#ifndef __bitwise__ #ifndef __bitwise__
# ifdef __CHECKER__ # ifdef __CHECKER__
...@@ -41,12 +46,14 @@ ...@@ -41,12 +46,14 @@
# endif # endif
#endif #endif
#define __u64 guint64 typedef guint8 __u8;
#define __u32 guint32 typedef guint16 __u16;
#define __u16 guint16 typedef gint32 __s32;
#define __u8 guint8 typedef guint32 __u32;
#define __s64 gint64 typedef gint64 __s64;
#define __s32 gint32 typedef guint64 __u64;
#define __le32 guint32 __bitwise typedef guint32 __bitwise __le32;
#endif
#endif /* __TYPES_COMPAT_H__ */ #endif /* __TYPES_COMPAT_H__ */
Markdown is supported
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