[PATCH i-g-t 03/22] build: use HAVE_LIBGEN_H consistently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also, we are _GNU_SOURCE, so simplify the conditions accordingly.

The next patch will remove _GNU_SOURCE everywhere else.

Reviewed-by: Eric Anholt <eric@xxxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 lib/drmtest.c        | 4 +---
 lib/igt_aux.c        | 4 +---
 lib/igt_core.c       | 4 +---
 lib/ioctl_wrappers.c | 4 +---
 lib/sw_sync.c        | 4 +---
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 158af68283b8..8a07152c701a 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -26,9 +26,7 @@
  *
  */
 
-#ifndef ANDROID
-#define _GNU_SOURCE
-#else
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
 #endif
 #include <stdio.h>
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index d808fe3ed27a..0c83a1f48ed2 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -26,9 +26,7 @@
  *
  */
 
-#ifndef ANDROID
-#define _GNU_SOURCE
-#else
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
 #endif
 #include <stdio.h>
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 7e5aa34237f1..ff6d19fc9bad 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -26,9 +26,7 @@
  *
  */
 
-#ifndef ANDROID
-#define _GNU_SOURCE
-#else
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
 #endif
 #include <stdio.h>
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 51000bac0513..b4d6210d5942 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -26,9 +26,7 @@
  *
  */
 
-#ifndef ANDROID
-#define _GNU_SOURCE
-#else
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
 #endif
 #include <stdio.h>
diff --git a/lib/sw_sync.c b/lib/sw_sync.c
index 7bd76702c8d1..9b36dd85c192 100644
--- a/lib/sw_sync.c
+++ b/lib/sw_sync.c
@@ -24,9 +24,7 @@
  *    Robert Foss <robert.foss@xxxxxxxxxxxxx>
  */
 
-#ifndef ANDROID
-#define _GNU_SOURCE
-#else
+#ifdef HAVE_LIBGEN_H
 #include <libgen.h>
 #endif
 #include <fcntl.h>
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux