diff options
Diffstat (limited to 'games-roguelike/nethack/files/3.4.1-errno.patch')
-rw-r--r-- | games-roguelike/nethack/files/3.4.1-errno.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/games-roguelike/nethack/files/3.4.1-errno.patch b/games-roguelike/nethack/files/3.4.1-errno.patch new file mode 100644 index 000000000000..60dcb65b2765 --- /dev/null +++ b/games-roguelike/nethack/files/3.4.1-errno.patch @@ -0,0 +1,68 @@ +--- ./src/files.c 2003-03-03 08:29:00.000000000 +0000 ++++ ./src/files.c 2003-03-03 08:29:24.000000000 +0000 +@@ -25,7 +25,7 @@ + # ifdef _DCC + const + # endif +-extern int errno; ++#include <errno.h> + #endif + + #if defined(UNIX) && defined(QT_GRAPHICS) +--- ./sys/amiga/winchar.c.orig 2003-02-27 07:23:36.000000000 -0500 ++++ ./sys/amiga/winchar.c 2003-02-27 07:24:34.000000000 -0500 +@@ -4,6 +4,7 @@ + /* Copyright (c) Gregg Wonderly, Naperville Illinois, 1994. */ + /* NetHack may be freely redistributed. See license for details. */ + ++#include <errno.h> + #include <exec/types.h> + #include <libraries/iffparse.h> + #include <graphics/scale.h> +@@ -206,7 +207,7 @@ + { + BitMapHeader *bmhd = NULL, bmhds; + unsigned char *cmap; +- extern int errno; ++ + register int i, j; + struct IFFHandle *iff; + struct StoredProperty *prop; +--- ./sys/unix/cpp2.shr.orig 2003-02-27 07:23:36.000000000 -0500 ++++ ./sys/unix/cpp2.shr 2003-02-27 07:25:28.000000000 -0500 +@@ -348,6 +348,7 @@ + X#endif + X + X#include <stdio.h> ++X#include <errno.h> + X#include <ctype.h> + X#include "cppdef.h" + X#include "cpp.h" +@@ -1113,7 +1114,6 @@ + X int i; /* argv[] index */ + X int j; /* Output index */ + X int file; /* File_descriptor */ +-X extern int errno; /* Last vms i/o error */ + X + X for (j = i = 1; i < argc; i++) { /* Do all arguments */ + X switch (*(ap = argv[i])) { +--- ./sys/unix/unixunix.c.orig 2003-02-27 07:23:36.000000000 -0500 ++++ ./sys/unix/unixunix.c 2003-02-27 07:25:59.000000000 -0500 +@@ -41,9 +41,6 @@ + (void) time(&date); + #endif + if(date - buf.st_mtime < 3L*24L*60L*60L) { /* recent */ +-#ifndef NETWORK +- extern int errno; +-#endif + int lockedpid; /* should be the same size as hackpid */ + + if(read(fd, (genericptr_t)&lockedpid, sizeof(lockedpid)) != +@@ -88,7 +85,6 @@ + void + getlock() + { +- extern int errno; + register int i = 0, fd, c; + const char *fq_lock; + |