Skip to content

Commit adfb0bd

Browse files
authored
Merge pull request #159 from karcherm/fix-gcc14-build
Define _POSIX_C_SOURCE for crfsuite source files
2 parents c0a5f95 + e6d1d0c commit adfb0bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def build_extensions(self):
3434
_compile = c._compile
3535

3636
def c_compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
37+
cc_args = cc_args + ["-D_POSIX_C_SOURCE=200112L"] if src.startswith("crfsuite/") else cc_args
3738
cc_args = cc_args + ["-std=c99"] if src.endswith(".c") else cc_args
3839
return _compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
3940

0 commit comments

Comments
 (0)