diff options
| author | Vicent Marti <tanoku@gmail.com> | 2014-06-20 14:42:16 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2014-06-20 14:42:16 +0200 |
| commit | 28f087c8642ff9c8dd6964e101e6d8539db6281a (patch) | |
| tree | 3518d1bf420e92c964bed03074575d8a1db88654 /src/unix | |
| parent | 4b0a36e881506a02b43a4ae3c19c93c919b36eeb (diff) | |
| parent | 1589aa0c4d48fb130d8a5db28c45cd3d173cde6d (diff) | |
| download | libgit2-28f087c8642ff9c8dd6964e101e6d8539db6281a.tar.gz | |
libgit2 v0.21.0v0.21.0
Diffstat (limited to 'src/unix')
| -rw-r--r-- | src/unix/map.c | 8 | ||||
| -rw-r--r-- | src/unix/posix.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/unix/map.c b/src/unix/map.c index 7de99c99d..3d0cbbaf8 100644 --- a/src/unix/map.c +++ b/src/unix/map.c @@ -6,12 +6,18 @@ */ #include <git2/common.h> -#ifndef GIT_WIN32 +#if !defined(GIT_WIN32) && !defined(NO_MMAP) #include "map.h" #include <sys/mman.h> +#include <unistd.h> #include <errno.h> +long git__page_size(void) +{ + return sysconf(_SC_PAGE_SIZE); +} + int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset) { int mprot = 0; diff --git a/src/unix/posix.h b/src/unix/posix.h index 9c9f837b9..1e41bcf18 100644 --- a/src/unix/posix.h +++ b/src/unix/posix.h @@ -28,7 +28,6 @@ char *p_realpath(const char *, char *); #define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a) #define p_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__) #define p_mkstemp(p) mkstemp(p) -#define p_setenv(n,v,o) setenv(n,v,o) #define p_inet_pton(a, b, c) inet_pton(a, b, c) /* see win32/posix.h for explanation about why this exists */ |
