]> xenbits.xensource.com Git - libvirt.git/commitdiff
Include sysmacros.h where needed
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 14 Apr 2016 13:11:45 +0000 (15:11 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 18 Apr 2016 18:36:57 +0000 (20:36 +0200)
So in glibc-2.23 sys/sysmacros.h is no longer included from sys/types.h
and we don't build because of the usage of major/minor/makedev macros.
Autoconf already has AC_HEADER_MAJOR macro that check where exactly
these functions/macros are defined, so let's use that.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
configure.ac
src/conf/domain_audit.c
src/lxc/lxc_controller.c
src/lxc/lxc_driver.c
src/util/vircgroup.c
src/util/virutil.c
tests/vircgroupmock.c

index 450f02cc13dd3e157a895975ee72d92b3d43c8c5..3c6a55fc594169590bc7df06b04f2ca3131d2a91 100644 (file)
@@ -144,6 +144,8 @@ AC_TYPE_UID_T
 dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
 AC_LIBTOOL_WIN32_DLL
 
+AC_HEADER_MAJOR
+
 m4_ifndef([LT_INIT], [
   AM_PROG_LIBTOOL
 ], [
index bd2eeb6a792d5c462bcd4a624b34dd1cb6c01086..36a3cf6ba0b4c4083ce57749dd7812e583362e16 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#ifdef MAJOR_IN_MKDEV
+# include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+# include <sys/sysmacros.h>
+#endif
+
 #include "domain_audit.h"
 #include "viraudit.h"
 #include "viruuid.h"
index 73e57e30ad48a8a87f14a0286c1c7ab647f8262e..de59775256b59116aff1d8955ecf9937f2b52e0a 100644 (file)
 #include <sys/wait.h>
 #include <sys/socket.h>
 #include <sys/types.h>
+
+#ifdef MAJOR_IN_MKDEV
+# include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+# include <sys/sysmacros.h>
+#endif
+
 #include <sys/un.h>
 #include <sys/personality.h>
 #include <unistd.h>
index ef488123db1273aff00d52a97bb9e45a707689ba..1dfbde33307335fcde32e276cc124b66c3981444 100644 (file)
 #include <sys/utsname.h>
 #include <string.h>
 #include <sys/types.h>
+
+#ifdef MAJOR_IN_MKDEV
+# include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+# include <sys/sysmacros.h>
+#endif
+
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/un.h>
index bffd88f90a44599a228305a8e0c5556a51282009..da5ccff35f8a5381f5060e86e0a132e7eca6dd5f 100644 (file)
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+
+#ifdef MAJOR_IN_MKDEV
+# include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+# include <sys/sysmacros.h>
+#endif
+
 #include <signal.h>
 #include <dirent.h>
 #include <unistd.h>
index 82051505d2585dd54434f95e4a71c0f1bc7d6b3b..d80d994327cdb32a180904c7dbd3016027843aed 100644 (file)
 #include <poll.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+
+#ifdef MAJOR_IN_MKDEV
+# include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+# include <sys/sysmacros.h>
+#endif
+
 #include <sys/ioctl.h>
 #include <string.h>
 #include <termios.h>
index 756ac51679b49d2643f81a484761ec76cabbdfe5..cfc51e8f63730e595ef624e03e8fbc8d34dcc10b 100644 (file)
 # include <unistd.h>
 # include <fcntl.h>
 # include <sys/stat.h>
+
+# ifdef MAJOR_IN_MKDEV
+#  include <sys/mkdev.h>
+# elif MAJOR_IN_SYSMACROS
+#  include <sys/sysmacros.h>
+# endif
+
 # include <stdarg.h>
 # include "testutilslxc.h"
 # include "virstring.h"