]> Cypherpunks repositories - gostls13.git/commitdiff
net: #define _GNU_SOURCE to 1
authorIan Lance Taylor <iant@golang.org>
Fri, 15 Mar 2024 04:22:31 +0000 (21:22 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 15 Mar 2024 17:49:28 +0000 (17:49 +0000)
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/net/cgo_unix_cgo.go

index 7c609eddbf76cdd56e2f50f1bb33a47cbc7e21d8..d38ae0a84f2bc3872ce70180a439bdf0c334bc22 100644 (file)
@@ -7,7 +7,7 @@
 package net
 
 /*
-#define _GNU_SOURCE
+#define _GNU_SOURCE 1
 
 #cgo CFLAGS: -fno-stack-protector
 #include <sys/types.h>