diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-25 11:02:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-25 11:02:11 -0700 |
commit | c5baf18a404a9713e1b75161855cacbfec32fcf2 (patch) | |
tree | 4e0abcbb51224f859308e28ffaa61652030c172a /git-compat-util.h | |
parent | c53312583b2d25b6ed5f0aa421993795743d1da6 (diff) | |
parent | 9ca0aaf6de357d46916d81ca40c47886092fe610 (diff) | |
download | git-c5baf18a404a9713e1b75161855cacbfec32fcf2.tar.gz |
Merge branch 'jk/diagnose-config-mmap-failure' into maint
The configuration reader/writer uses mmap(2) interface to access
the files; when we find a directory, it barfed with "Out of memory?".
* jk/diagnose-config-mmap-failure:
xmmap(): drop "Out of memory?"
config.c: rewrite ENODEV into EISDIR when mmap fails
config.c: avoid xmmap error messages
config.c: fix mmap leak when writing config
read-cache.c: drop PROT_WRITE from mmap of index
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index b45c75fc7a..3be44f146b 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -717,6 +717,7 @@ extern char *xstrndup(const char *str, size_t len); extern void *xrealloc(void *ptr, size_t size); extern void *xcalloc(size_t nmemb, size_t size); extern void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); +extern void *xmmap_gently(void *start, size_t length, int prot, int flags, int fd, off_t offset); extern ssize_t xread(int fd, void *buf, size_t len); extern ssize_t xwrite(int fd, const void *buf, size_t len); extern ssize_t xpread(int fd, void *buf, size_t len, off_t offset); |