From b5411515e92d4b1d32202035bff338e783b9065b Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Wed, 19 Sep 2018 22:55:23 +0300 Subject: [PATCH] libv4l: fix build with glibc 2.28 Add two upstream patches adding the needed header for the major/minor macros. Fixes: http://autobuild.buildroot.net/results/f38/f3858970c1bbb7b0201389f7656c9ccf15a59fda/ Cc: Fabrice Fontaine Signed-off-by: Baruch Siach Signed-off-by: Thomas Petazzoni --- ...5-libv4lconvert-fix-compiler-warning.patch | 45 +++++++++++++++++++ .../0006-v4l2-ctl-fix-glibc-2.28-build.patch | 30 +++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 package/libv4l/0005-libv4lconvert-fix-compiler-warning.patch create mode 100644 package/libv4l/0006-v4l2-ctl-fix-glibc-2.28-build.patch diff --git a/package/libv4l/0005-libv4lconvert-fix-compiler-warning.patch b/package/libv4l/0005-libv4lconvert-fix-compiler-warning.patch new file mode 100644 index 0000000000..941a51e638 --- /dev/null +++ b/package/libv4l/0005-libv4lconvert-fix-compiler-warning.patch @@ -0,0 +1,45 @@ +From 380fe7d4548a99bfcfc1594b6f0b3dd2369978f1 Mon Sep 17 00:00:00 2001 +From: Hans Verkuil +Date: Sun, 1 Apr 2018 12:10:33 +0200 +Subject: [PATCH] libv4lconvert: fix compiler warning + + CC control/libv4lconvert_la-libv4lcontrol.lo +control/libv4lcontrol.c: In function ‘v4lcontrol_get_usb_info’: +control/libv4lcontrol.c:391:13: warning: In the GNU C Library, "minor" is defined + by . For historical compatibility, it is + currently defined by as well, but we plan to + remove this soon. To use "minor", include + directly. If you did not intend to use a system-defined macro + "minor", you should undefine it after including . + c == '\n' && minor_dev == minor(st.st_rdev)) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Dropped the '#if defined(MAJOR_IN_SYSMACROS)' to ensure that sysmacros.h +is always included. It seems that #if is no longer needed. At least, +nobody complained when I removed it in other places earlier :-) + +Signed-off-by: Hans Verkuil +Signed-off-by: Baruch Siach +--- +Upstream status: commit 380fe7d4548a9 + + lib/libv4lconvert/control/libv4lcontrol.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c +index 1e784eda8a92..59f28b137b98 100644 +--- a/lib/libv4lconvert/control/libv4lcontrol.c ++++ b/lib/libv4lconvert/control/libv4lcontrol.c +@@ -20,9 +20,7 @@ + */ + + #include +-#if defined(MAJOR_IN_SYSMACROS) + #include +-#endif + #include + #include + #include +-- +2.18.0 + diff --git a/package/libv4l/0006-v4l2-ctl-fix-glibc-2.28-build.patch b/package/libv4l/0006-v4l2-ctl-fix-glibc-2.28-build.patch new file mode 100644 index 0000000000..c66f4d8033 --- /dev/null +++ b/package/libv4l/0006-v4l2-ctl-fix-glibc-2.28-build.patch @@ -0,0 +1,30 @@ +From f7eb207a3b90fef6a9c8fbdc506e809cc9757bd1 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Thu, 20 Sep 2018 21:20:16 +0200 +Subject: [PATCH] v4l2-ctl: fix glibc 2.28 build + +Include header needed for the major/minor macros in glibc 2.28+. + +This patch is extracted from upstream commit 65e7b2a4076845d (v4l2-ctl: show +media/entity info if available). + +Signed-off-by: Baruch Siach +--- + utils/v4l2-ctl/v4l2-ctl.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp +index e02dc756..12a19bc7 100644 +--- a/utils/v4l2-ctl/v4l2-ctl.cpp ++++ b/utils/v4l2-ctl/v4l2-ctl.cpp +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.14.4 +