Skip to content

Commit 33d3ee7

Browse files
committed
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.
1 parent a29a292 commit 33d3ee7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/cbm/cbm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cbm
22

33
/*
4-
#cgo CFLAGS: -std=c11 -O2 -Wall -Ivendored/ts_runtime/include
4+
#cgo CFLAGS: -std=c11 -D_DEFAULT_SOURCE -O2 -Wall -Ivendored/ts_runtime/include
55
#include "cbm.h"
66
#include "helpers.h"
77
#include "lang_specs.h"

0 commit comments

Comments
 (0)