fix build on Linux
This commit is contained in:
parent
c5e92e4742
commit
a4138d3464
3 changed files with 32 additions and 17 deletions
|
@ -1,10 +1,10 @@
|
|||
$NetBSD: distinfo,v 1.6 2015/11/04 03:29:10 agc Exp $
|
||||
$NetBSD: distinfo,v 1.7 2016/03/09 06:52:02 tnn Exp $
|
||||
|
||||
SHA1 (xp-1.2b10.tar.gz) = 70b232966ee2483ceb8f0ae8f0ef0cf7b899104b
|
||||
RMD160 (xp-1.2b10.tar.gz) = 035f6f7dd3143e220ab454388d1632788e9e2bd3
|
||||
SHA512 (xp-1.2b10.tar.gz) = 6c45b91dccdf1a9dc5b836f7ed38a3abd5e309671c19011b0d3d3333049071ec3236bc531a1fada919ca7c43c54f48802b51644971d864860e1250f969073cae
|
||||
Size (xp-1.2b10.tar.gz) = 43036 bytes
|
||||
SHA1 (patch-aa) = 0d6fa753ff8010ba6264b0bfc19e44c3a5f723ce
|
||||
SHA1 (patch-ab) = 62b440dd9e5ee419113589d3758a1a6bcba35f5d
|
||||
SHA1 (patch-ab) = 770f89ca133df9827370caf47280815d9923d52c
|
||||
SHA1 (patch-ac) = 4451ed9962f98c2dbaae4c4dcd2a3d0e369a72d6
|
||||
SHA1 (patch-ad) = 40cba728947de06e1fb118527a940b9cdea4fb48
|
||||
SHA1 (patch-readfile.c) = d72c2c0f2fd0d21ff8c73e134ea9080e0966d68d
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
$NetBSD: patch-ab,v 1.1.1.1 1999/08/13 19:35:45 tron Exp $
|
||||
$NetBSD: patch-ab,v 1.2 2016/03/09 06:52:02 tnn Exp $
|
||||
|
||||
--- utils.c.orig Thu Feb 11 13:44:15 1999
|
||||
+++ utils.c Fri Aug 13 21:30:56 1999
|
||||
@@ -1,13 +1,18 @@
|
||||
It's 2016. Everyone has strerror.
|
||||
|
||||
--- utils.c.orig 1999-02-11 12:44:15.000000000 +0000
|
||||
+++ utils.c
|
||||
@@ -1,13 +1,8 @@
|
||||
#include <errno.h>
|
||||
-#define NULL 0
|
||||
+#include <string.h>
|
||||
#define NULL 0
|
||||
|
||||
|
||||
char *
|
||||
uerror() {
|
||||
+#ifdef HAS_STRERROR
|
||||
- extern int sys_nerr;
|
||||
- extern char *sys_errlist[];
|
||||
- if (errno > sys_nerr)
|
||||
- return NULL;
|
||||
- else
|
||||
- return sys_errlist[errno];
|
||||
+ return strerror(errno);
|
||||
+#else
|
||||
extern int sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
if (errno > sys_nerr)
|
||||
return NULL;
|
||||
else
|
||||
return sys_errlist[errno];
|
||||
+#endif
|
||||
}
|
||||
|
|
16
x11/xp/patches/patch-readfile.c
Normal file
16
x11/xp/patches/patch-readfile.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
$NetBSD: patch-readfile.c,v 1.1 2016/03/09 06:52:02 tnn Exp $
|
||||
|
||||
use proper malloc prototypes
|
||||
|
||||
--- readfile.c.orig 1999-02-11 10:34:04.000000000 +0000
|
||||
+++ readfile.c
|
||||
@@ -34,8 +34,7 @@
|
||||
#include <X11/Xos.h> /* get types.h */
|
||||
#include <sys/stat.h>
|
||||
|
||||
-extern char *malloc();
|
||||
-extern char *realloc();
|
||||
+#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* readinlump - read data from a file into a single buffer in 1 go
|
Loading…
Reference in a new issue