Browse Source

Fix for bug https://bugs.launchpad.net/dulwich/+bug/794543, where strnlen is defined twice if you're using OS X 10.7 (Lion).

Ryan McKern 13 years ago
parent
commit
149b0d8ecc
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
 
-#if defined(__MINGW32_VERSION) || defined(__APPLE__)
+#if defined(__MINGW32_VERSION) || (defined(__APPLE__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
 size_t strnlen(char *text, size_t maxlen)
 {
 	const char *last = memchr(text, '\0', maxlen);