Browse Source

Cope with strnlen() not existing on Mac.

dak180 14 năm trước cách đây
mục cha
commit
3e3ac24744
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);