Skip to content

Commit bd8c667

Browse files
committed
need remaining copts in previous commit
-D_GNU_SOURCE - Enables all GNU extensions -D_POSIX_C_SOURCE=200809L - Enables POSIX.1-2008 features -D_XOPEN_SOURCE=600 - Enables X/Open System Interface (XSI) features These macros should make the necessary POSIX terminal functions (grantpt, posix_openpt, ptsname, unlockpt) available to CGo when building the Go standard library. The error occurred because these functions are part of the POSIX terminal interface, and they need to be explicitly enabled through feature test macros when building with certain C library implementations.
1 parent f6d4107 commit bd8c667

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

toolchain/private/defs.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ def _target_linux_gnu(gocpu, zigcpu, glibc_version):
162162
dynamic_library_linkopts = [],
163163
supports_dynamic_linker = True,
164164
copts = [
165+
"-D_GNU_SOURCE",
165166
"-D_POSIX_C_SOURCE=200809L",
167+
"-D_XOPEN_SOURCE=600",
166168
],
167169
libc = "glibc",
168170
bazel_target_cpu = "k8",

0 commit comments

Comments
 (0)