[PATCH v2 09/11] lib/drmtest: Get the correct basename() under Android

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

 



From: Oscar Mateo <oscar.mateo@xxxxxxxxx>

Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
---
 lib/drmtest.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 44fd30e..75f49cd 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -26,7 +26,11 @@
  *
  */
 
+#ifndef ANDROID
 #define _GNU_SOURCE
+#else
+#include <libgen.h>
+#endif
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -1007,7 +1011,7 @@ static bool run_under_gdb(void)
 
 	sprintf(buf, "/proc/%d/exe", getppid());
 	return (readlink (buf, buf, sizeof (buf)) != -1 &&
-		strncmp (basename (buf), "gdb", 3) == 0);
+		strncmp(basename(buf), "gdb", 3) == 0);
 }
 
 void __igt_fail_assert(int exitcode, const char *file,
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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