]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: guard against redefinition of PTHREAD_KEYS_MAX
authorShenghou Ma <minux@golang.org>
Thu, 18 Dec 2014 04:52:39 +0000 (23:52 -0500)
committerMinux Ma <minux@golang.org>
Thu, 18 Dec 2014 21:23:25 +0000 (21:23 +0000)
Fixes #9374.

Change-Id: Ic53757eba98fc43bcd24e25e03876fef917b4da1
Reviewed-on: https://go-review.googlesource.com/1751
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/runtime/cgo/gcc_android_arm.c

index 07f7e72e3d08ce071444a65b2e74e29795aeae7f..85cd244c02caba0589ddb36d41d38d3125118490 100644 (file)
 
 // PTHREAD_KEYS_MAX has been added to sys/limits.h at head in bionic:
 // https://android.googlesource.com/platform/bionic/+/master/libc/include/sys/limits.h
-// TODO(crawshaw): remove this definition when a new NDK is released.
+// TODO(crawshaw): remove this definition when NDK r10d is required.
+#ifndef PTHREAD_KEYS_MAX
 #define PTHREAD_KEYS_MAX 128
+#endif
 
 // inittls allocates a thread-local storage slot for g.
 //