Fix Linux build: add _DEFAULT_SOURCE for endian macros

-std=c11 disables _DEFAULT_SOURCE on glibc, hiding le16toh/be16toh
from <endian.h>. Add -D_DEFAULT_SOURCE to CGo CFLAGS.
This commit is contained in:
Martin Vogel
2026-03-06 18:19:24 +01:00
parent 03a99be966
commit affa63a435
+1 -1
View File
@@ -1,7 +1,7 @@
package cbm
/*
#cgo CFLAGS: -std=c11 -O2 -Wall -Ivendored/ts_runtime/include
#cgo CFLAGS: -std=c11 -D_DEFAULT_SOURCE -O2 -Wall -Ivendored/ts_runtime/include
#include "cbm.h"
#include "helpers.h"
#include "lang_specs.h"