Explorar el Código

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 hace 13 años
padre
commit
149b0d8ecc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);