python-crfsuite icon indicating copy to clipboard operation
python-crfsuite copied to clipboard

Define _POSIX_C_SOURCE for crfsuite source files

Open karcherm opened this issue 1 year ago • 0 comments

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

karcherm avatar Jun 12 '24 21:06 karcherm