diff options
-rw-r--r-- | Makefile | 21 | ||||
-rw-r--r-- | fetch-pack.c | 3 | ||||
-rw-r--r-- | git-compat-util.h | 6 |
3 files changed, 27 insertions, 3 deletions
@@ -80,6 +80,8 @@ all:: # # Define NO_MEMMEM if you don't have memmem. # +# Define NO_GETPAGESIZE if you don't have getpagesize. +# # Define NO_STRLCPY if you don't have strlcpy. # # Define NO_STRTOUMAX if you don't have both strtoimax and strtoumax in the @@ -1455,6 +1457,22 @@ else NO_CURL = YesPlease endif endif +ifeq ($(uname_S),QNX) + COMPAT_CFLAGS += -DSA_RESTART=0 + HAVE_STRINGS_H = YesPlease + NEEDS_SOCKET = YesPlease + NO_FNMATCH_CASEFOLD = YesPlease + NO_GETPAGESIZE = YesPlease + NO_ICONV = YesPlease + NO_MEMMEM = YesPlease + NO_MKDTEMP = YesPlease + NO_MKSTEMPS = YesPlease + NO_NSEC = YesPlease + NO_PTHREADS = YesPlease + NO_R_TO_GCC_LINKER = YesPlease + NO_STRCASESTR = YesPlease + NO_STRLCPY = YesPlease +endif -include config.mak.autogen -include config.mak @@ -1872,6 +1890,9 @@ ifdef NO_MEMMEM COMPAT_CFLAGS += -DNO_MEMMEM COMPAT_OBJS += compat/memmem.o endif +ifdef NO_GETPAGESIZE + COMPAT_CFLAGS += -DNO_GETPAGESIZE +endif ifdef INTERNAL_QSORT COMPAT_CFLAGS += -DINTERNAL_QSORT COMPAT_OBJS += compat/qsort.o diff --git a/fetch-pack.c b/fetch-pack.c index 099ff4ddf..f0acdf733 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -874,8 +874,6 @@ static int fetch_pack_config(const char *var, const char *value, void *cb) return git_default_config(var, value, cb); } -static struct lock_file lock; - static void fetch_pack_setup(void) { static int did_setup; @@ -917,6 +915,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args, ref_cpy = do_fetch_pack(args, fd, ref, sought, pack_lockfile); if (args->depth > 0) { + static struct lock_file lock; struct cache_time mtime; struct strbuf sb = STRBUF_INIT; char *shallow = git_path("shallow"); diff --git a/git-compat-util.h b/git-compat-util.h index a88147b2d..610e6b7ea 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -75,7 +75,7 @@ # endif #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \ !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \ - !defined(__TANDEM) + !defined(__TANDEM) && !defined(__QNX__) #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif @@ -413,6 +413,10 @@ void *gitmemmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen); #endif +#ifdef NO_GETPAGESIZE +#define getpagesize() sysconf(_SC_PAGESIZE) +#endif + #ifdef FREAD_READS_DIRECTORIES #ifdef fopen #undef fopen |