tree-sitter / go-tree-sitter

Go bindings for tree-sitter
MIT License
31 stars 8 forks source link

set _POSIX_C_SOURCE=200112L in CFLAGS #8

Closed lollipopman closed 1 month ago

lollipopman commented 1 month ago

Prior to this commit _POSIX_C_SOURCE was defined first in which is included by cgo first1. By default sets _POSIX_C_SOURCE=199506L, which conflicts with tree-sitter's setting of _POSIX_C_SOURCE=200112L. After this commit we use a CFLAG to set the feature macro before any files are included.

Fixes: #7

amaanq commented 1 month ago

Hm this is an unideal solution but totally fine (go moment) - I noticed this in a machine of mine as well but chalked it up to a bad environment or something since GH's Linux CI machines were happy anyways.