swrast: Build fix for Solaris
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 16 May 2015 02:05:45 +0000 (19:05 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 20 May 2015 20:44:21 +0000 (21:44 +0100)
Fixes regression from commit 5b2d3480f57168d50ad24cf0b8c9244414bd3701

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
configure.ac
src/mesa/drivers/dri/swrast/swrast.c

index 095e23e69b68411258b5597edd379ef0e6603924..5594548ddfd174103f5c793a06504d25ea744d1b 100644 (file)
@@ -649,6 +649,7 @@ if test "x$enable_asm" = xyes; then
 fi
 
 AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
+AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
 AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
 
 dnl Check to see if dlopen is in default libraries (like Solaris, which
index cbc946c3ffdc768438aa3fc8317e0773ab49c869..2d4bb702fc26718d5e4d0372c69de20afc2d2a8c 100644 (file)
@@ -62,7 +62,9 @@
 #include "swrast/s_context.h"
 
 #include <sys/types.h>
-#include <sys/sysctl.h>
+#ifdef HAVE_SYS_SYSCTL_H
+# include <sys/sysctl.h>
+#endif
 
 const __DRIextension **__driDriverGetExtensions_swrast(void);