Skip to content

Commit

Permalink
Merge pull request #159 from karcherm/fix-gcc14-build
Browse files Browse the repository at this point in the history
Define _POSIX_C_SOURCE for crfsuite source files
  • Loading branch information
fgregg authored Sep 30, 2024
2 parents c0a5f95 + e6d1d0c commit adfb0bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def build_extensions(self):
_compile = c._compile

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

Expand Down

0 comments on commit adfb0bd

Please sign in to comment.