[Intel-gfx] [PATCH i-g-t] Fix compilation on some distros

Ausmus, James james.ausmus at intel.com
Tue Oct 3 23:38:29 UTC 2017


On Thu, Sep 28, 2017 at 1:40 AM, Petri Latvala <petri.latvala at intel.com> wrote:
> On Wed, Sep 27, 2017 at 04:08:27PM -0700, James Ausmus wrote:
>> Some distros (such as Gentoo) are removing the include of
>> sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in
>> files where we use the minor() and major() functions.
>>
>> Signed-off-by: James Ausmus <james.ausmus at intel.com>
>
> Reviewed-by: Petri Latvala <petri.latvala at intel.com>
>

Thanks for the review! Can you push? I don't have access rights.

Thanks!

-James

>
>
>> ---
>>  lib/igt_debugfs.c | 1 +
>>  lib/igt_sysfs.c   | 1 +
>>  tools/aubdump.c   | 1 +
>>  3 files changed, 3 insertions(+)
>>
>> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
>> index 1e8c8cc3cd44..60b29e3a025a 100644
>> --- a/lib/igt_debugfs.c
>> +++ b/lib/igt_debugfs.c
>> @@ -25,6 +25,7 @@
>>  #include <inttypes.h>
>>  #include <sys/stat.h>
>>  #include <sys/mount.h>
>> +#include <sys/sysmacros.h>
>>  #include <dirent.h>
>>  #include <errno.h>
>>  #include <stdio.h>
>> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
>> index 817678bc28ed..f4e306003b01 100644
>> --- a/lib/igt_sysfs.c
>> +++ b/lib/igt_sysfs.c
>> @@ -24,6 +24,7 @@
>>
>>  #include <inttypes.h>
>>  #include <sys/stat.h>
>> +#include <sys/sysmacros.h>
>>  #include <sys/mount.h>
>>  #include <errno.h>
>>  #include <stdarg.h>
>> diff --git a/tools/aubdump.c b/tools/aubdump.c
>> index 78d183f49adc..ee4d99b06ed1 100644
>> --- a/tools/aubdump.c
>> +++ b/tools/aubdump.c
>> @@ -30,6 +30,7 @@
>>  #include <stdarg.h>
>>  #include <fcntl.h>
>>  #include <sys/types.h>
>> +#include <sys/sysmacros.h>
>>  #include <sys/stat.h>
>>  #include <sys/ioctl.h>
>>  #include <unistd.h>
>> --
>> 2.14.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 


James Ausmus


More information about the Intel-gfx mailing list