Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set _POSIX_C_SOURCE=200112L in CFLAGS #8

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

lollipopman
Copy link
Contributor

Prior to this commit _POSIX_C_SOURCE was defined first in <stdlib.h> which is included by cgo first1. By default <stdlib.h> 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

Prior to this commit _POSIX_C_SOURCE was defined first in <stdlib.h>
which is included by cgo first[1]. By default <stdlib.h> 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.

[1]: golang/go#35315

Fixes: tree-sitter#7
@amaanq
Copy link
Member

amaanq commented Sep 29, 2024

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.

@amaanq amaanq merged commit 6a715e0 into tree-sitter:master Sep 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure on debian sid
2 participants