Page MenuHomeFreeBSD

D51491.diff
No OneTemporary

D51491.diff

diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -120,7 +120,8 @@
if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1)
RETURN_ERROR(errno, error0);
new_table = _fstat(hashp->fp, &statbuf) == 0 &&
- statbuf.st_size == 0 && (flags & O_ACCMODE) != O_RDONLY;
+ statbuf.st_size == 0 &&
+ ((flags & O_ACCMODE) != O_RDONLY || (flags & O_CREAT) != 0);
} else
new_table = 1;

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 11:36 AM (15 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31975166
Default Alt Text
D51491.diff (485 B)

Event Timeline