Browse Source

Cope with strnlen() not existing on Mac.

dak180 14 years ago
parent
commit
3e3ac24744
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dulwich/_objects.c

+ 1 - 1
dulwich/_objects.c

@@ -25,7 +25,7 @@
 typedef int Py_ssize_t;
 #endif
 
-#ifdef __MINGW32_VERSION
+#if defined(__MINGW32_VERSION) || defined(__APPLE__)
 size_t strnlen(char *text, size_t maxlen)
 {
 	const char *last = memchr(text, '\0', maxlen);