blob: b9a7b8c0fed25f1173f1721a5e793d7ed204c3c9 (
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
|
$NetBSD: patch-ae,v 1.3 2010/01/15 23:47:14 dholland Exp $
- Include fixes for modern Unix.
- Suppress mktemp() warning on NetBSD; callers use O_EXCL.
Upstream: as far as I know not actively maintained upstream.
--- unixpk.c.orig 2003-07-21 16:50:41.000000000 -0400
+++ unixpk.c 2009-02-15 15:09:47.000000000 -0500
@@ -22,8 +22,16 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
+
+#ifdef __NetBSD__
+/* Use of mktemp() below is ok - resulting names are opened with O_EXCL. */
+#define __MKTEMP_OK__
+#endif
+
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <errno.h>
#include "common.h"
#include "version.h"
@@ -31,9 +39,6 @@
#define MAXADDRESS 100
-extern char *getenv();
-
-extern int errno;
extern int optind;
extern char *optarg;
|