summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-06-08 13:15:40 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-06-08 15:04:03 +0100
commit83681bad9ef9d94ddf0babb6998406932d818de7 (patch)
tree7341e2e6c7a4653c3967e9d81e70f156e9989683
parent69c1da6393bbe75fcef41c683415668cdd9079c9 (diff)
util: Include libgen.h on MacOSX & MinGW.
To ensure basename prototype is declared. On Linux continue to use the GLIBC version from string.h Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--tests/util/piglit-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index 179834329..98b134023 100644
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -51,6 +51,10 @@ extern "C" {
#include <math.h>
#include <float.h>
+#if defined(__APPLE__) || defined(__MINGW32__)
+# include "libgen.h" // for basename
+#endif
+
#include "piglit-log.h"
#ifndef __has_attribute