sbcl: update to 2.5.1
[oi-userland.git] / components / mail / mpack / patches / patch-ae.patch
blobb5085dccab1b98c5010b2d67b320d8e4f5781a54
1 $NetBSD: patch-ae,v 1.5 2010/06/15 04:18:04 dholland Exp $
3 - Include fixes for modern Unix.
4 - Suppress mktemp() warning on NetBSD; callers use O_EXCL.
6 Upstream: as far as I know not actively maintained upstream.
8 --- unixpk.c.orig 2003-07-21 22:50:41.000000000 +0200
9 +++ unixpk.c
10 @@ -22,8 +22,11 @@
11 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
12 * SOFTWARE.
15 #include <stdio.h>
16 +#include <stdlib.h>
17 #include <string.h>
18 +#include <unistd.h>
19 #include <errno.h>
20 #include "common.h"
21 #include "version.h"
22 @@ -31,9 +39,6 @@
24 #define MAXADDRESS 100
26 -extern char *getenv();
28 -extern int errno;
29 extern int optind;
30 extern char *optarg;
32 @@ -164,7 +169,11 @@ int main(int argc, char **argv)
33 strcpy(fnamebuf, getenv("TMPDIR"));
35 else {
36 - strcpy(fnamebuf, "/usr/tmp");
37 +#if defined(P_tmpdir)
38 + strcpy(fnamebuf, P_tmpdir);
39 +#else
40 + strcpy(fnamebuf, "/var/tmp");
41 +#endif
43 strcat(fnamebuf, "/mpackXXXXXX");
44 mktemp(fnamebuf);