Loading...
--- Libc/Libc-1725.40.4/include/sys/cdefs.h
+++ Libc/Libc-1353.11.2/include/sys/cdefs.h
@@ -105,10 +105,13 @@
extern int pthread_key_init_np(int, void (*)(void *));
-// Not needed anymore by this header, but other headers rely on this include being here.
#include <TargetConditionals.h>
-
+#if TARGET_IPHONE_SIMULATOR
+/* Simulator keys are offset by 200 */
+#define __LIBC_PTHREAD_KEY(x) (210 + (x))
+#else
#define __LIBC_PTHREAD_KEY(x) (10 + (x))
+#endif
/*
* Libc pthread key assignments