summaryrefslogtreecommitdiff
path: root/misc/openoffice2/patches/patch-ad
blob: 64465cadcbf82f51e04c5632621f6deb60328960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$NetBSD: patch-ad,v 1.3 2007/10/06 20:02:22 hira Exp $

--- sal/osl/unx/system.c.orig	2007-07-05 18:05:56.000000000 +0900
+++ sal/osl/unx/system.c	2007-09-26 17:14:54.000000000 +0900
@@ -71,8 +71,11 @@
 struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size )
 #endif /* BUILD_OS_APPLEOSX */
 #else /* MACOSX */
+#if (__NetBSD_Version__ < 299001000)
 struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size )
+#endif
 #endif /* MACOSX */
+#if (__NetBSD_Version__ < 299001000)
 {
   	struct passwd* res;
 
@@ -138,8 +141,9 @@
         return(res);
 #endif /* MACOSX */
 }
+#endif
 
-#if defined(NETBSD) || defined(MACOSX)
+#if (defined(NETBSD) && (__NetBSD_Version__ < 299001000)) || defined(MACOSX)
 int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer,
            size_t buflen, struct passwd **result)
 {
@@ -432,7 +436,7 @@
 }
 #endif /* !defined(FREEBSD) || (__FreeBSD_version < 601103) */
 
-#if defined(MACOSX)
+#if defined(MACOSX) || defined(NETBSD)
 /*
  * This section works around calls that are missing or broken
  * in MacOS X 10.1.x and earlier.
@@ -476,6 +480,10 @@
     return nRet;
 }
 
+#endif
+
+#if defined(MACOSX)
+
 /* No reentrant asctime() either... */
 
 /*******************************************************************************/