Mesa (master): util: fix to detect NetBSD properly
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 9 20:02:19 UTC 2019
Module: Mesa
Branch: master
Commit: 1ee42583830facd9f903f431891d0400cee963cf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ee42583830facd9f903f431891d0400cee963cf
Author: OBATA Akio <obache at wizdas.com>
Date: Mon Sep 16 16:39:32 2019 +0900
util: fix to detect NetBSD properly
<sys/param.h> is required for NetBSD version detection,
and __NetBSD__ must be used to detect even on older releases.
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/util/u_process.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/util/u_process.c b/src/util/u_process.c
index 371335303ec..b9328d58da4 100644
--- a/src/util/u_process.c
+++ b/src/util/u_process.c
@@ -87,8 +87,11 @@ __getProgramName()
# if (__FreeBSD_version >= 440000)
# define GET_PROGRAM_NAME() getprogname()
# endif
-#elif defined(__NetBSD__) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000100)
-# define GET_PROGRAM_NAME() getprogname()
+#elif defined(__NetBSD__)
+# include <sys/param.h>
+# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000100)
+# define GET_PROGRAM_NAME() getprogname()
+# endif
#elif defined(__DragonFly__)
# define GET_PROGRAM_NAME() getprogname()
#elif defined(__APPLE__)
@@ -123,7 +126,7 @@ __getProgramName()
#endif
#if !defined(GET_PROGRAM_NAME)
-# if defined(__OpenBSD__) || defined(NetBSD) || defined(__UCLIBC__) || defined(ANDROID)
+# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__UCLIBC__) || defined(ANDROID)
/* This is a hack. It's said to work on OpenBSD, NetBSD and GNU.
* Rogelio M.Serrano Jr. reported it's also working with UCLIBC. It's
* used as a last resort, if there is no documented facility available. */
More information about the mesa-commit
mailing list