aboutsummaryrefslogtreecommitdiff
path: root/.builds/netbsd.diff
diff options
context:
space:
mode:
Diffstat (limited to '.builds/netbsd.diff')
-rw-r--r--.builds/netbsd.diff72
1 files changed, 72 insertions, 0 deletions
diff --git a/.builds/netbsd.diff b/.builds/netbsd.diff
new file mode 100644
index 0000000..14ca9af
--- /dev/null
+++ b/.builds/netbsd.diff
@@ -0,0 +1,72 @@
+diff --git a/stdlib.h b/stdlib.h
+index 51dbb0c70836..f47d0b9467ee 100644
+--- a/stdlib.h
++++ b/stdlib.h
+@@ -186,12 +186,8 @@ void srandom(unsigned int) __RENAME(__srandom60);
+ #endif
+ #ifdef _NETBSD_SOURCE
+ #define RANDOM_MAX 0x7fffffff /* (((long)1 << 31) - 1) */
+-int mkostemp(char *, int);
+-int mkostemps(char *, int, int);
+ #endif
+
+-char *mkdtemp(char *);
+-int mkstemp(char *);
+ char *mktemp(char *)
+ #ifdef __MKTEMP_OK__
+ __RENAME(_mktemp)
+@@ -206,8 +202,6 @@ int ttyslot(void);
+
+ void *valloc(size_t); /* obsoleted by malloc() */
+
+-int getsubopt(char **, char * const *, char **);
+-
+ int grantpt(int);
+ int unlockpt(int);
+ char *ptsname(int);
+@@ -255,6 +249,24 @@ int posix_openpt(int);
+ int posix_memalign(void **, size_t, size_t);
+ #endif
+
++/*
++ * The Open Group Base Specifications, Issue 7; IEEE Std 1003.1-2008 (POSIX)
++ * or
++ * X/Open Portability Guide >= Issue 4 Version 2
++ */
++#if (_POSIX_C_SOURCE - 0) >= 200809L || \
++ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
++ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
++char *mkdtemp(char *);
++int mkstemp(char *);
++#ifdef _NETBSD_SOURCE
++int mkostemp(char *, int);
++int mkostemps(char *, int, int);
++#endif
++
++int getsubopt(char **, char * const *, char **);
++#endif
++
+ /*
+ * Implementation-defined extensions
+ */
+diff --git a/sys/cdefs.h b/sys/cdefs.h
+index ac8f1e3b9faf..7370015eb513 100644
+--- a/sys/cdefs.h
++++ b/sys/cdefs.h
+@@ -499,13 +499,11 @@
+ #endif
+
+ #if !defined(_STANDALONE) && !defined(_KERNEL)
+-#if defined(__GNUC__) || defined(__PCC__)
+-#define __RENAME(x) ___RENAME(x)
+-#elif defined(__lint__)
++#if defined(__lint__)
+ #define __RENAME(x) __symbolrename(x)
+ #else
+-#error "No function renaming possible"
+-#endif /* __GNUC__ */
++#define __RENAME(x) ___RENAME(x)
++#endif /* __lint__ */
+ #else /* _STANDALONE || _KERNEL */
+ #define __RENAME(x) no renaming in kernel/standalone environment
+ #endif