diff options
author | Oscar Mateo <oscar.mateo@intel.com> | 2013-11-12 11:50:43 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-12 12:16:03 +0100 |
commit | 235ff9cf34f37d7eb778d72acd298b0cd8c01ab5 (patch) | |
tree | 5f101a21f3a3bcef4378c84717a57f3cad6bf5c0 | |
parent | 5032e7bbdd342ac111ab2c57bf82b3dd4d26f208 (diff) |
lib/drmtest: Get the correct basename() under Android
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | lib/drmtest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c index 44fd30ee..75f49cd7 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, |