include sys/sysmacros.h for major() & minor() 12/219912/4
authorMike Frysinger <vapier@gentoo.org>
Mon, 14 Mar 2016 21:10:03 +0000 (17:10 -0400)
committerAndrey Kazmin <a.kazmin@partner.samsung.com>
Thu, 12 Dec 2019 10:16:39 +0000 (13:16 +0300)
Linux C libraries are looking to disentangle sysmacros.h from the
sys/types.h header to clean up namespace pollution.  Since these
macros are provided in glibc/etc... today, switch to pulling in
this header directly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Backported from trunk: f00fb19a1bb307bf11396058f01db89e6fe288d4
There was a merge conflict with the original patch.
The following file is missed in the current version:
contrib/test/mc_nextgen_test.c
It was excluded from the patch.

Change-Id: I38b6f75c36a0372e961deda73ce8f5dabed43053
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
lib/libv4lconvert/control/libv4lcontrol.c
utils/libmedia_dev/get_media_devices.c
utils/media-ctl/libmediactl.c

index 33bf9ce..2956df5 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 #include <sys/mman.h>
 #include <fcntl.h>
 #include <sys/stat.h>
index e3a2200..edfeb41 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 #include <sys/stat.h>
 #include <string.h>
 #include <stdlib.h>
index ec360bd..2dd0ae3 100644 (file)
@@ -24,6 +24,7 @@
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 
 #include <ctype.h>
 #include <errno.h>