소스 검색

Cope with strnlen() not existing on Mac.

dak180 14 년 전
부모
커밋
5b08ef6aa0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);