[Intel-gfx] [PATCH i-g-t 03/12] build: use HAVE_LIBGEN_H consistently
Daniel Vetter
daniel.vetter at ffwll.ch
Sat Sep 2 17:03:57 UTC 2017
Also, we are _GNU_SOURCE, so simplify the conditions accordingly.
The next patch will remove _GNU_SOURCE everywhere else.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
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 99a82d5ae0e1..cf15db69c661 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 at collabora.com>
*/
-#ifndef ANDROID
-#define _GNU_SOURCE
-#else
+#ifdef HAVE_LIBGEN_H
#include <libgen.h>
#endif
#include <fcntl.h>
--
2.9.5
More information about the Intel-gfx
mailing list