summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-06-11 16:29:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-11 16:29:55 (GMT)
commitdee47925c1d001947cf9a099e1cb883835f90c64 (patch)
tree43b49f39956a69276de2aa25c956868cc8ec675c /git-compat-util.h
parent8f436d1374c7b8bd29118bd6344520dbaf83594b (diff)
parent9ca0aaf6de357d46916d81ca40c47886092fe610 (diff)
downloadgit-dee47925c1d001947cf9a099e1cb883835f90c64.zip
git-dee47925c1d001947cf9a099e1cb883835f90c64.tar.gz
git-dee47925c1d001947cf9a099e1cb883835f90c64.tar.bz2
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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 17584ad..0cc7ae8 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);