Sfoglia il codice sorgente

Cope with strnlen() not existing on Mac.

dak180 14 anni fa
parent
commit
3e3ac24744
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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);