include sys/sysmacros.h for major/minor
authorMike Frysinger <vapier@gentoo.org>
Wed, 20 Apr 2016 16:52:19 +0000 (12:52 -0400)
committerJens Axboe <axboe@fb.com>
Thu, 21 Apr 2016 11:47:26 +0000 (07:47 -0400)
These functions have always been defined in sys/sysmacros.h under
Linux C libraries.  For some, including sys/types.h implicitly
includes that as well, but glibc wants to deprecate that, and some
others already have.  Include the header explicitly for the funcs.

The mtd change is already in upstream mtd-utils too.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
os/os-linux.h
oslib/libmtd_common.h

index 9e708f04c7b020f466decf189909ff3e9df2d6c6..23c16b65b79c8a6bfcae13a2ebbbb0481b61a5cd 100644 (file)
@@ -6,6 +6,7 @@
 #include <sys/ioctl.h>
 #include <sys/uio.h>
 #include <sys/syscall.h>
+#include <sys/sysmacros.h>
 #include <sys/vfs.h>
 #include <sys/mman.h>
 #include <unistd.h>
index a1233232674b36a3915612d7ae311facc53f37aa..9768066b6a4449a562802ba972c6507eaf044494 100644 (file)
@@ -30,6 +30,7 @@
 #include <errno.h>
 #include <features.h>
 #include <inttypes.h>
+#include <sys/sysmacros.h>
 
 #ifndef PROGRAM_NAME
 # error "You must define PROGRAM_NAME before including this header"