Define _GNU_SOURCE for BSD compability

This commit is contained in:
Frédéric Mangano-Tarumi 2020-09-19 10:42:53 +02:00 committed by Frédéric Mangano-Tarumi
parent b369aea8d4
commit 9715f0242f

View File

@ -9,6 +9,11 @@ project(
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# opustags is mainly developed with glibc, which introduces a few
# incompatibilites with BSDs, like getline not being defined by default.
# _GNU_SOURCE should trigger BSDs libc GNU compatibility mode to fix that.
add_definitions(-D_GNU_SOURCE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OGG REQUIRED ogg)
add_compile_options(${OGG_CFLAGS})