diff options
author | Pavel Grunt <pgrunt@redhat.com> | 2016-11-01 17:08:01 +0100 |
---|---|---|
committer | Pavel Grunt <pgrunt@redhat.com> | 2016-11-14 11:21:30 +0100 |
commit | a27a83da30d58511b2a5f2cdb13ebd4fca7a3d0a (patch) | |
tree | 03408ebf033438aebd64ff5f39fb2fcefca834bc | |
parent | efbfdc1971e1dbef2784c7255bb67315e7e8a686 (diff) |
Adjust include header to new location of macros
minor & major macros were moved to sysmacros.h
usbutil.c: In function ‘spice_usbutil_get_sysfs_attribute’:
usbutil.c:110:14: warning: ‘__major_from_sys_types’ is deprecated:
In the GNU C Library, `major' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `major', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `major',
you should #undef it after including <sys/types.h>.
[-Wdeprecated-declarations]
major(stat_buf.st_rdev), minor(stat_buf.st_rdev), attribute);
Acked-by: Victor Toso <victortoso@redhat.com>
-rw-r--r-- | src/usbutil.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/usbutil.c b/src/usbutil.c index 7bfbe44..b68a2e1 100644 --- a/src/usbutil.c +++ b/src/usbutil.c @@ -30,7 +30,10 @@ #ifdef __linux__ #include <stdio.h> #include <unistd.h> +#include <sys/sysmacros.h> +#ifndef major /* major and minor macros were moved to sys/sysmacros.h from sys/types.h */ #include <sys/types.h> +#endif #include <sys/stat.h> #endif #include "usbutil.h" |