[PATCH:intel-gpu-tools 4/7] Need to #include <libgen.h> for basename() on Solaris

Alan Coopersmith alan.coopersmith at oracle.com
Tue Dec 23 19:07:11 PST 2014


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac   |    2 +-
 lib/igt_core.c |    4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index fe46066..bee40ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@ enable_gtk_doc=no
 
 # Checks for functions, headers, structures, etc.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h])
+AC_CHECK_HEADERS([termios.h linux/kd.h sys/kd.h libgen.h])
 AC_CHECK_MEMBERS([struct sysinfo.totalram],[],[],[AC_INCLUDES_DEFAULT
 		  #include <sys/sysinfo.h>
 		  ])
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 3c68780..e6b091a 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -65,6 +65,10 @@
 #include "igt_core.h"
 #include "igt_aux.h"
 
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>   /* for basename() on Solaris */
+#endif
+
 /**
  * SECTION:igt_core
  * @short_description: Core i-g-t testing support
-- 
1.7.9.2



More information about the xorg-devel mailing list