diff options
author | Adam Jackson <ajax@redhat.com> | 2017-04-27 14:45:25 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-09-25 15:54:20 -0400 |
commit | c5320244a3501aaf9558715e9097a2a625cb768b (patch) | |
tree | 24bc854479a4d90ec0617171f05af6841eb5eff0 /hw | |
parent | 0e79797e3cb3f8fafe271f4f233a8a8fd25f2001 (diff) |
xfree86: Silence a new glibc warning
glibc would like to stop declaring major()/minor() macros in
<sys/types.h> because that header gets included absolutely everywhere
and unix device major/minor is perhaps usually not what's expected. Fair
enough. If one includes <sys/sysmacros.h> as well then glibc knows we
meant it and doesn't warn, so do that if it exists.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit d732c36597fab2e9bc4f2aa72cf1110997697557)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 3 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_init.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 39de498a3..136bf50ff 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -84,6 +84,9 @@ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> +#ifdef HAVE_SYS_SYSMACROS_H +#include <sys/sysmacros.h> +#endif #ifdef HAVE_SYS_MKDEV_H #include <sys/mkdev.h> /* for major() & minor() on Solaris */ #endif diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c index dbf497ca2..9e5ddcd50 100644 --- a/hw/xfree86/os-support/linux/lnx_init.c +++ b/hw/xfree86/os-support/linux/lnx_init.c @@ -38,6 +38,9 @@ #include "xf86_OSlib.h" #include <sys/stat.h> +#ifdef HAVE_SYS_SYSMACROS_H +#include <sys/sysmacros.h> +#endif #ifndef K_OFF #define K_OFF 0x4 |