1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:54:42 -07:00

runtime/cgo: guard against redefinition of PTHREAD_KEYS_MAX

Fixes #9374.

Change-Id: Ic53757eba98fc43bcd24e25e03876fef917b4da1
Reviewed-on: https://go-review.googlesource.com/1751
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Shenghou Ma 2014-12-17 23:52:39 -05:00 committed by Minux Ma
parent 6ce3cd18fa
commit 340ef004d6

View File

@ -12,8 +12,10 @@
// 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.
//