From 73cac618016a471e770672883619b0e323f9d875 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 14 Mar 2024 21:22:31 -0700 Subject: [PATCH] net: #define _GNU_SOURCE to 1 Makes the build work with CGO_CPPFLAGS=-D_GNU_SOURCE, as reportedly used by TinyGo. Fixes #66325 Change-Id: I794f1cd89814638fdb6c3066d13bbd7da88c9d93 Reviewed-on: https://go-review.googlesource.com/c/go/+/571875 LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor Reviewed-by: Damien Neil Reviewed-by: Cherry Mui --- src/net/cgo_unix_cgo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/cgo_unix_cgo.go b/src/net/cgo_unix_cgo.go index 7c609eddbf..d38ae0a84f 100644 --- a/src/net/cgo_unix_cgo.go +++ b/src/net/cgo_unix_cgo.go @@ -7,7 +7,7 @@ package net /* -#define _GNU_SOURCE +#define _GNU_SOURCE 1 #cgo CFLAGS: -fno-stack-protector #include -- 2.50.0