diff options
author | Ben Straub <bstraub@github.com> | 2012-07-17 08:08:34 -0700 |
---|---|---|
committer | Ben Straub <bstraub@github.com> | 2012-07-17 08:08:34 -0700 |
commit | bfc65634050dc52e3ed6b4497ebbb511e39d6e1e (patch) | |
tree | 32b03847b8a152b69bc3b48b6bb32e7b8621f45e /src/unix | |
parent | 1d68fcd04b21a2c5665d0ca6a5543e7166c73457 (diff) | |
parent | ea5d2ce4cfa6cec89e2d844a70d1eb24bb401c7d (diff) | |
download | libgit2-bfc65634050dc52e3ed6b4497ebbb511e39d6e1e.tar.gz |
Merge branch 'development' into clone
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/map.c | 2 | ||||
-rw-r--r-- | src/unix/posix.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/unix/map.c b/src/unix/map.c index 772f4e247..9dcae5845 100644 --- a/src/unix/map.c +++ b/src/unix/map.c @@ -33,6 +33,7 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs mflag = MAP_PRIVATE; out->data = mmap(NULL, len, mprot, mflag, fd, offset); + if (!out->data || out->data == MAP_FAILED) { giterr_set(GITERR_OS, "Failed to mmap. Could not write data"); return -1; @@ -47,6 +48,7 @@ int p_munmap(git_map *map) { assert(map != NULL); munmap(map->data, map->len); + return 0; } diff --git a/src/unix/posix.h b/src/unix/posix.h index 304dd1419..7a3a388ec 100644 --- a/src/unix/posix.h +++ b/src/unix/posix.h @@ -7,7 +7,7 @@ #ifndef INCLUDE_posix__w32_h__ #define INCLUDE_posix__w32_h__ -#ifndef __sun +#if !defined(__sun) && !defined(__amigaos4__) # include <fnmatch.h> # define p_fnmatch(p, s, f) fnmatch(p, s, f) #else |