Skip to content

Commit

Permalink
libvmaf: use _XOPEN_SOURCE, not _POSIX_C_SOURCE
Browse files Browse the repository at this point in the history
On BSD operating systems (I tested FreeBSD and NetBSD), with
_POSIX_C_SOURCE=200112L, M_PI (needed by src/feature/ciede.c) is not
exposed.

_XOPEN_SOURCE=600 exposes a superset of _POSIX_C_SOURCE=200112L,
including M_PI.
  • Loading branch information
alyssais authored and kylophone committed Jan 24, 2023
1 parent b9150a2 commit f47640f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libvmaf/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ elif host_machine.system() == 'darwin'
test_args += '-D_DARWIN_C_SOURCE'
add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c')
else
test_args += '-D_POSIX_C_SOURCE=200112L'
add_project_arguments('-D_POSIX_C_SOURCE=200112L', language: 'c')
test_args += '-D_XOPEN_SOURCE=600'
add_project_arguments('-D_XOPEN_SOURCE=600', language: 'c')
endif

# Header checks
Expand Down

0 comments on commit f47640f

Please sign in to comment.