diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-07-18 12:50:16 -0700 |
---|---|---|
committer | David Hendricks <david.hendricks@gmail.com> | 2020-07-21 04:55:01 +0000 |
commit | e410164d11affb73971dc947c5dcfb3f39a2dfeb (patch) | |
tree | f119ec5521754e78ffc8ede9af9e9285ac1c7727 | |
parent | 0c65b5048df7a3b0ca5f760bb8d12816019aea96 (diff) | |
download | flashrom-e410164d11affb73971dc947c5dcfb3f39a2dfeb.tar.gz flashrom-e410164d11affb73971dc947c5dcfb3f39a2dfeb.tar.bz2 flashrom-e410164d11affb73971dc947c5dcfb3f39a2dfeb.zip |
meson: fix compilation under uClibc-ng
fileno requires _POSIX_C_SOURCE to only be defined.
nanosleep requires _POSIX_C_SOURCE to be defined to 199309L.
strndup requires _POSIX_C_SOURCE to be defined to 200809L.
Change-Id: Idb80937bb78e173eb03f2a0c0cdd8925fcd7bfa1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/43599
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r-- | meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 5374e871..ef7ac2c1 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,7 @@ conf = configuration_data() cc = meson.get_compiler('c') add_project_arguments(cc.get_supported_arguments(warning_flags), language : 'c') add_project_arguments('-D_DEFAULT_SOURCE', language : 'c') -add_project_arguments('-D_POSIX_C_SOURCE', language : 'c') # required for fileno +add_project_arguments('-D_POSIX_C_SOURCE=200809L', language : 'c') # required for fileno, nanosleep, and strndup add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19 add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : 'c') |