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

Define _POSIX_C_SOURCE for crfsuite source files #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karcherm
Copy link

gcc-14 has "-Werror=implicit-function-declaration" enabled by default. crfsuite uses posix_memalign which only gets defined when _POSIX_C_SOURCE is defined, so make sure the flag is set when compiling crfsuite.

On the other hand, openSUSE Tumbleweed has _POSIX_C_SOURCE defined in pyconfig.h, so you must not add "-D_POSIX_C_SOURCE" when compiling the python binding source code. So add it only for the subdir crfsuite.

Fixes #158

gcc-14 has "-Werror=implicit-function-declaration" enabled by default.
crfsuite uses posix_memalign which only gets defined when _POSIX_C_SOURCE is
defined, so make sure the flag is set when compiling crfsuite.

On the other hand, openSUSE Tumbleweed has _POSIX_C_SOURCE defined
in pyconfig.h, so you must not add "-D_POSIX_C_SOURCE" when compiling
the python binding source code. So add it only for the subdir crfsuite.
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.

Fails to build with GCC 14 due to -Wimplicit-function-declaration
1 participant