--- a/configure.ac +++ a/configure.ac @@ -282,2 +282,5 @@ AC_CHECK_SIZEOF([long]) +dnl detect system-specific headers for major()/minor() +AC_HEADER_MAJOR + dnl Availability of various common functions (non-fatal if missing), --- a/src/conf/domain_audit.c +++ a/src/conf/domain_audit.c @@ -28,2 +28,9 @@ +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif + #include "domain_audit.h" --- a/src/lxc/lxc_controller.c +++ a/src/lxc/lxc_controller.c @@ -48,2 +48,9 @@ +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif + #include "virerror.h" --- a/src/lxc/lxc_driver.c +++ a/src/lxc/lxc_driver.c @@ -38,2 +38,9 @@ +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif + #include "virerror.h" --- a/src/util/vircgroup.c +++ a/src/util/vircgroup.c @@ -31,2 +31,10 @@ #endif + +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif + #include --- a/src/util/virutil.c +++ a/src/util/virutil.c @@ -68,2 +68,9 @@ +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif + #include "c-ctype.h"