Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9152417 commit b499852Copy full SHA for b499852
src/posix.h
@@ -89,13 +89,17 @@ extern struct tm * p_gmtime_r (const time_t *timer, struct tm *result);
89
# include "unix/posix.h"
90
#endif
91
92
-#if defined(__MINGW32__) || defined(__sun)
+#if defined(__MINGW32__) || defined(__sun) || defined(__APPLE__)
93
+# define NO_STRNLEN
94
+#endif
95
+
96
+#ifdef NO_STRNLEN
97
GIT_INLINE(size_t) p_strnlen(const char *s, size_t maxlen) {
98
const char *end = memchr(s, 0, maxlen);
99
return end ? (size_t)(end - s) : maxlen;
100
}
101
#else
-# define p_strnlen strnlen
102
+# define p_strnlen strnlen
103
104
105
#ifdef NO_READDIR_R
0 commit comments