[Mesa-dev] [PATCH] adjust a couple of ifdefs to handle NetBSD correctly
Tobias Nygren
tnn at NetBSD.org
Fri Apr 17 11:27:55 PDT 2015
Signed-off-by: Tobias Nygren <tnn at NetBSD.org>
---
src/gallium/include/pipe/p_config.h | 2 +-
src/mesa/drivers/dri/common/xmlconfig.c | 2 +-
src/mesa/x86/common_x86.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index 5b6db7d..794aabe 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -157,7 +157,7 @@
# define PIPE_ARCH_BIG_ENDIAN
#endif
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
#include <sys/types.h>
#include <machine/endian.h>
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index 2b284cc..f17693e 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -56,7 +56,7 @@ extern char *program_invocation_name, *program_invocation_short_name;
# include <stdlib.h>
# define GET_PROGRAM_NAME() getprogname()
# endif
-#elif defined(__NetBSD__) && defined(__NetBSD_Version) && (__NetBSD_Version >= 106000100)
+#elif defined(__NetBSD__) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000100)
# include <stdlib.h>
# define GET_PROGRAM_NAME() getprogname()
#elif defined(__APPLE__)
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 86fbca9..1c86405 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -42,7 +42,7 @@
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
-#if defined(USE_SSE_ASM) && defined(__OpenBSD__)
+#if defined(USE_SSE_ASM) && (defined(__OpenBSD__) || defined(__NetBSD__))
#include <sys/param.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
--
2.3.5
More information about the mesa-dev
mailing list