aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-11-23 20:04:53 +0000
committerrsc <devnull@localhost>2003-11-23 20:04:53 +0000
commit478ee9636fcfe3509d0a901d1250524a5c41d3a8 (patch)
tree539eccccbee0a00b306c45583212e4ebb25d7ab6
parent1c253ceb586c4519f42ce115954c4efab787f81a (diff)
downloadplan9port-478ee9636fcfe3509d0a901d1250524a5c41d3a8.tar.gz
plan9port-478ee9636fcfe3509d0a901d1250524a5c41d3a8.tar.bz2
plan9port-478ee9636fcfe3509d0a901d1250524a5c41d3a8.zip
Make things build on FreeBSD again.
-rw-r--r--src/cmd/diff/diffdir.c4
-rw-r--r--src/lib9/_p9dialparse.c8
-rw-r--r--src/lib9/_p9dir.c9
-rw-r--r--src/libsec/port/aes.c2
-rw-r--r--src/libsec/port/md5.c1
-rw-r--r--src/libthread/proctab.c10
-rw-r--r--src/mkfile2
-rw-r--r--src/mkhdr2
8 files changed, 16 insertions, 22 deletions
diff --git a/src/cmd/diff/diffdir.c b/src/cmd/diff/diffdir.c
index 41e4fbf4..c9446d6b 100644
--- a/src/cmd/diff/diffdir.c
+++ b/src/cmd/diff/diffdir.c
@@ -4,9 +4,9 @@
#include "diff.h"
static int
-itemcmp(void *v1, void *v2)
+itemcmp(const void *v1, const void *v2)
{
- char **d1 = v1, **d2 = v2;
+ char *const*d1 = v1, *const*d2 = v2;
return strcmp(*d1, *d2);
}
diff --git a/src/lib9/_p9dialparse.c b/src/lib9/_p9dialparse.c
index 44594dc0..45027513 100644
--- a/src/lib9/_p9dialparse.c
+++ b/src/lib9/_p9dialparse.c
@@ -1,9 +1,11 @@
-#include <netdb.h>
-#include <sys/un.h>
-
#include <u.h>
+#define NOPLAN9DEFINES
#include <libc.h>
+#include <sys/types.h>
+#include <netdb.h>
+#include <sys/un.h>
+
static char *nets[] = { "tcp", "udp", nil };
#define CLASS(p) ((*(uchar*)(p))>>6)
diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c
index 0903c57d..d94208cc 100644
--- a/src/lib9/_p9dir.c
+++ b/src/lib9/_p9dir.c
@@ -1,3 +1,8 @@
+#include <u.h>
+#define NOPLAN9DEFINES
+#include <libc.h>
+
+#include <sys/types.h>
#include <sys/stat.h>
#ifdef _HAVEDISKLABEL
#include <sys/disklabel.h>
@@ -6,10 +11,6 @@
#include <pwd.h>
#include <grp.h>
-#include <u.h>
-#define NOPLAN9DEFINES
-#include <libc.h>
-
int
_p9dir(struct stat *st, char *name, Dir *d, char **str, char *estr)
{
diff --git a/src/libsec/port/aes.c b/src/libsec/port/aes.c
index dda9c8a5..ac1cac21 100644
--- a/src/libsec/port/aes.c
+++ b/src/libsec/port/aes.c
@@ -950,6 +950,7 @@ static int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int
return 0;
}
+#if 0
/**
* Expand the cipher key into the decryption key schedule.
*
@@ -994,6 +995,7 @@ static int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int
}
return Nr;
}
+#endif
static void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) {
u32 s0, s1, s2, s3, t0, t1, t2, t3;
diff --git a/src/libsec/port/md5.c b/src/libsec/port/md5.c
index bb2f3cb3..1d579446 100644
--- a/src/libsec/port/md5.c
+++ b/src/libsec/port/md5.c
@@ -28,7 +28,6 @@
*/
static void encode(uchar*, u32int*, ulong);
-static void decode(u32int*, uchar*, ulong);
extern void _md5block(uchar*, ulong, u32int*);
diff --git a/src/libthread/proctab.c b/src/libthread/proctab.c
index 222d8c25..5e5dcb2b 100644
--- a/src/libthread/proctab.c
+++ b/src/libthread/proctab.c
@@ -26,17 +26,7 @@ __threadgetproc(int rm)
{
Proc **l, *p;
int h, pid;
- Thread *t;
- ulong *s;
-/* fails on linux, probably because the main stack
- * has to be grown a page at a time instead of the big jump?
- s = (ulong*)((ulong)&pid & ~(STKSIZE-1));
- if(s[0] == STKMAGIC){
- t = (Thread*)s[1];
- return t->proc;
- }
-*/
pid = _threadgetpid();
lock(&ptablock);
diff --git a/src/mkfile b/src/mkfile
index a896be23..23e34efe 100644
--- a/src/mkfile
+++ b/src/mkfile
@@ -13,7 +13,7 @@ DIRS=\
libthread\
libutf\
libventi\
-# cmd\
+ cmd\
<mkdirs
diff --git a/src/mkhdr b/src/mkhdr
index d1b65729..3b0384e0 100644
--- a/src/mkhdr
+++ b/src/mkhdr
@@ -13,7 +13,7 @@ O=o
BIN=$PLAN9/bin
LIBDIR=$PLAN9/lib
-<$PLAN9/src/mk.$SYSNAME-$OBJTYPE
+<|cat $PLAN9/src/mk.$SYSNAME-$OBJTYPE 2>/dev/null || true
OS=$O
LD=9l