summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.h1
-rw-r--r--src/config.c4
-rw-r--r--src/fnmatch.c2
-rw-r--r--src/posix.c2
-rw-r--r--src/remote.c2
-rw-r--r--src/strnlen.h2
-rw-r--r--src/util.c2
7 files changed, 9 insertions, 6 deletions
diff --git a/src/common.h b/src/common.h
index 9c8bdc18a..dd97a3099 100644
--- a/src/common.h
+++ b/src/common.h
@@ -44,6 +44,7 @@
#else
# include <unistd.h>
+# include <strings.h>
# ifdef GIT_THREADS
# include <pthread.h>
# include <sched.h>
diff --git a/src/config.c b/src/config.c
index b3168f735..16854c0c8 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1144,7 +1144,7 @@ int git_config_parse_int64(int64_t *out, const char *value)
}
fail_parse:
- giterr_set(GITERR_CONFIG, "Failed to parse '%s' as an integer", value);
+ giterr_set(GITERR_CONFIG, "Failed to parse '%s' as an integer", value ? value : "(null)");
return -1;
}
@@ -1164,7 +1164,7 @@ int git_config_parse_int32(int32_t *out, const char *value)
return 0;
fail_parse:
- giterr_set(GITERR_CONFIG, "Failed to parse '%s' as a 32-bit integer", value);
+ giterr_set(GITERR_CONFIG, "Failed to parse '%s' as a 32-bit integer", value ? value : "(null)");
return -1;
}
diff --git a/src/fnmatch.c b/src/fnmatch.c
index 3846bab3c..d8a83a8ed 100644
--- a/src/fnmatch.c
+++ b/src/fnmatch.c
@@ -62,6 +62,8 @@ p_fnmatchx(const char *pattern, const char *string, int flags, size_t recurs)
flags &= ~FNM_PATHNAME;
while (c == '*')
c = *++pattern;
+ if (c == '/')
+ c = *++pattern;
}
if (*string == '.' && (flags & FNM_PERIOD) &&
diff --git a/src/posix.c b/src/posix.c
index 7b2962feb..7484ac0d8 100644
--- a/src/posix.c
+++ b/src/posix.c
@@ -99,7 +99,7 @@ const char *p_gai_strerror(int ret)
#endif /* NO_ADDRINFO */
-int p_open(const char *path, int flags, ...)
+int p_open(const char *path, volatile int flags, ...)
{
mode_t mode = 0;
diff --git a/src/remote.c b/src/remote.c
index ea638e373..be7198a98 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -73,7 +73,7 @@ static int ensure_remote_name_is_valid(const char *name)
if (!git_remote_is_valid_name(name)) {
giterr_set(
GITERR_CONFIG,
- "'%s' is not a valid remote name.", name);
+ "'%s' is not a valid remote name.", name ? name : "(null)");
error = GIT_EINVALIDSPEC;
}
diff --git a/src/strnlen.h b/src/strnlen.h
index 007da2e55..fdd7fe39c 100644
--- a/src/strnlen.h
+++ b/src/strnlen.h
@@ -7,7 +7,7 @@
#ifndef INCLUDE_strlen_h__
#define INCLUDE_strlen_h__
-#if defined(__MINGW32__) || defined(__sun) || defined(__APPLE__)
+#if defined(__MINGW32__) || defined(__sun) || defined(__APPLE__) || defined(__MidnightBSD__)
# define NO_STRNLEN
#endif
diff --git a/src/util.c b/src/util.c
index 39858254f..f9d37e4f4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -612,7 +612,7 @@ void git__qsort_r(
#if defined(__MINGW32__) || defined(AMIGA) || \
defined(__OpenBSD__) || defined(__NetBSD__) || \
defined(__gnu_hurd__) || defined(__ANDROID_API__) || \
- defined(__sun) || \
+ defined(__sun) || defined(__CYGWIN__) || \
(__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)
git__insertsort_r(els, nel, elsize, NULL, cmp, payload);
#elif defined(GIT_WIN32)