From ca1f79f732648f9de52b0f63def37000dc9225e6 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Tue, 15 Apr 2008 12:19:02 -0400 Subject: Fix build on darwin --- server/cdb_find.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'server/cdb_find.c') diff --git a/server/cdb_find.c b/server/cdb_find.c index 2fc2bcf..b7c2fc9 100644 --- a/server/cdb_find.c +++ b/server/cdb_find.c @@ -2,6 +2,7 @@ #include #include +#include #include #ifndef SEEK_SET @@ -11,7 +12,7 @@ RCSID("$Id: cdb_find.c,v 1.2 2000/02/29 19:31:33 shmit Exp $"); static int -cdb_bread(char **ptr, char *endptr, char *buf, unsigned int len) +cdb_bread(char **ptr, char *endptr, unsigned char *buf, unsigned int len) { if ((*ptr)+len > endptr) { errno = EIO; @@ -24,9 +25,9 @@ cdb_bread(char **ptr, char *endptr, char *buf, unsigned int len) } static int -match(char **ptr, char *endptr, const char *key, unsigned int len) +match(char **ptr, char *endptr, const unsigned char *key, unsigned int len) { - char buf[32]; + unsigned char buf[32]; int n; int i; @@ -49,11 +50,11 @@ match(char **ptr, char *endptr, const char *key, unsigned int len) } int -cdb_find(char *buff, off_t bufflen, const char *key, int len, - char **ret, uint32_t *retlen) +cdb_find(char *buff, off_t bufflen, const unsigned char *key, + unsigned int len, char **ret, uint32_t *retlen) { char *cur, *end; - char packbuf[8]; + unsigned char packbuf[8]; uint32_t pos; uint32_t h; uint32_t lenhash; -- cgit v1.2.3