9bb34014da
If we have NetBSD 2.99.10 and higher, getpwuid_r and friends exist, but _PTHREAD_THREAD_SAFE_FUNCTIONS might not be defined. Define it. For NetBSD before 2.99.10, explicitly set XNO_MTSAFE_PWDAPI to enforce locked access via normal functions.
22 lines
574 B
Text
22 lines
574 B
Text
$NetBSD: patch-ac,v 1.6 2006/01/09 13:13:53 joerg Exp $
|
|
|
|
--- lib/Xm/Xmos.c.orig 2005-11-25 05:50:57.000000000 +0100
|
|
+++ lib/Xm/Xmos.c
|
|
@@ -91,6 +91,17 @@ extern int regex();
|
|
|
|
#include <sys/stat.h>
|
|
|
|
+#if defined(__NetBSD__)
|
|
+#include <sys/param.h>
|
|
+# if __NetBSD_Version__ >= 299001000 /* NetBSD 2.99.10 has getpw*_r*/
|
|
+# if !defined(_POSIX_THREAD_SAFE_FUNCTIONS)
|
|
+# define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
|
+# endif
|
|
+# else
|
|
+# define XNO_MTSAFE_PWDAPI
|
|
+# endif
|
|
+#endif
|
|
+
|
|
#define X_INCLUDE_PWD_H
|
|
#define X_INCLUDE_DIRENT_H
|
|
#define XOS_USE_XT_LOCKING
|