diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-11 09:29:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-11 09:29:55 -0700 |
commit | dee47925c1d001947cf9a099e1cb883835f90c64 (patch) | |
tree | 43b49f39956a69276de2aa25c956868cc8ec675c /git-compat-util.h | |
parent | 8f436d1374c7b8bd29118bd6344520dbaf83594b (diff) | |
parent | 9ca0aaf6de357d46916d81ca40c47886092fe610 (diff) | |
download | git-dee47925c1d001947cf9a099e1cb883835f90c64.tar.gz |
Merge branch 'jk/diagnose-config-mmap-failure'
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 17584adbd0..0cc7ae84ba 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -718,6 +718,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); |