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>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/43599
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71760
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/meson.build b/meson.build
index 5ce6dfe..de249d4 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,7 @@
 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')