Skip to content

Commit bccd686

Browse files
committed
runtime/cgo: use pthread_getattr_np on Android
It is defined in bionic libc since at least API level 3. Use it. Updates #68285. Change-Id: I215c2d61d5612e7c0298b2cb69875690f8fbea66 Reviewed-on: https://go-review.googlesource.com/c/go/+/626275 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 411ba0a commit bccd686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/cgo/gcc_stack_unix.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ x_cgo_getstackbound(uintptr bounds[2])
2121
// Needed before pthread_getattr_np, too, since before glibc 2.32
2222
// it did not call pthread_attr_init in all cases (see #65625).
2323
pthread_attr_init(&attr);
24-
#if defined(__GLIBC__) || (defined(__sun) && !defined(__illumos__))
24+
#if defined(__GLIBC__) || defined(__BIONIC__) || (defined(__sun) && !defined(__illumos__))
2525
// pthread_getattr_np is a GNU extension supported in glibc.
2626
// Solaris is not glibc but does support pthread_getattr_np
2727
// (and the fallback doesn't work...). Illumos does not.

0 commit comments

Comments
 (0)