[Piglit] [PATCH 2/3] util: Include libgen.h on MacOSX & MinGW.

Jose Fonseca jfonseca at vmware.com
Mon Jun 8 05:17:34 PDT 2015


To ensure basename prototype is declared.

On Linux continue to use the GLIBC version from string.h
---
 tests/util/piglit-util.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index 1798343..98b1340 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
-- 
2.1.0



More information about the Piglit mailing list