]> git.saurik.com Git - apple/libc.git/blob - db/hash/FreeBSD/hash.c.patch
ad04e83cbba41c7d38c75ff5c40ab7956c558fc3
[apple/libc.git] / db / hash / FreeBSD / hash.c.patch
1 Index: hash.c
2 ===================================================================
3 RCS file: /cvs/root/Libc/db/hash/FreeBSD/hash.c,v
4 retrieving revision 1.3
5 diff -u -d -b -w -p -u -r1.3 hash.c
6 --- hash.c 2004/11/25 19:37:57 1.3
7 +++ hash.c 2004/12/10 20:34:43
8 @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD: src/lib/libc/db/hash
9 #include <db.h>
10 #include "hash.h"
11 #include "page.h"
12 -#include "extern.h"
13 +#include "hash_extern.h"
14
15 static int alloc_segs(HTAB *, int);
16 static int flush_meta(HTAB *);
17 @@ -108,8 +108,7 @@ __hash_open(file, flags, mode, info, dfl
18 int bpages, hdrsize, new_table, nsegs, save_errno;
19
20 if ((flags & O_ACCMODE) == O_WRONLY) {
21 - errno = EINVAL;
22 - return (NULL);
23 + flags += O_RDWR - O_WRONLY; /* POSIX */
24 }
25
26 if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB))))