Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/unix
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-07-17 19:08:34 +0400
committerBen Straub <bstraub@github.com>2012-07-17 19:08:34 +0400
commitbfc65634050dc52e3ed6b4497ebbb511e39d6e1e (patch)
tree32b03847b8a152b69bc3b48b6bb32e7b8621f45e /src/unix
parent1d68fcd04b21a2c5665d0ca6a5543e7166c73457 (diff)
parentea5d2ce4cfa6cec89e2d844a70d1eb24bb401c7d (diff)
Merge branch 'development' into clone
Diffstat (limited to 'src/unix')
-rw-r--r--src/unix/map.c2
-rw-r--r--src/unix/posix.h2
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