From: Yu Watanabe Date: Wed, 3 Apr 2024 16:29:41 +0000 (+0900) Subject: man/examples: set _GNU_SOURCE in source, rather than by compile option X-Git-Tag: v256-rc1~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=040cb66458e7a06c759569c08948188296c267fe;p=thirdparty%2Fsystemd.git man/examples: set _GNU_SOURCE in source, rather than by compile option Addresses https://github.com/systemd/systemd/pull/32057#issuecomment-2034408569. --- diff --git a/man/event-quick-child.c b/man/event-quick-child.c index b95ee1bef63..828f0cd6f4b 100644 --- a/man/event-quick-child.c +++ b/man/event-quick-child.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: MIT-0 */ +#define _GNU_SOURCE 1 #include #include #include diff --git a/man/hwdb-usb-device.c b/man/hwdb-usb-device.c index facd8c43b29..3ce3ccd87f5 100644 --- a/man/hwdb-usb-device.c +++ b/man/hwdb-usb-device.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: MIT-0 */ +#define _GNU_SOURCE 1 #include #include #include diff --git a/man/journal-iterate-poll.c b/man/journal-iterate-poll.c index d377324b780..6b78296267a 100644 --- a/man/journal-iterate-poll.c +++ b/man/journal-iterate-poll.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: MIT-0 */ +#define _GNU_SOURCE 1 #include #include #include diff --git a/man/journal-stream-fd.c b/man/journal-stream-fd.c index c70d7986b29..595091af810 100644 --- a/man/journal-stream-fd.c +++ b/man/journal-stream-fd.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: MIT-0 */ +#define _GNU_SOURCE 1 #include #include #include diff --git a/man/meson.build b/man/meson.build index 22ac236b273..a728fa33842 100644 --- a/man/meson.build +++ b/man/meson.build @@ -306,10 +306,10 @@ default_args = [ ] std_args_in = [ - [ '-std=c99', '-D_GNU_SOURCE', ], - [ '-std=c11', '-D_GNU_SOURCE', ], - [ '-std=c17', '-D_GNU_SOURCE', ], - [ '-std=c23', '-D_GNU_SOURCE', ], + [ '-std=c99', ], + [ '-std=c11', ], + [ '-std=c17', ], + [ '-std=c23', ], [ '-std=gnu99', ], [ '-std=gnu11', ], [ '-std=gnu17', ], diff --git a/man/notify-selfcontained-example.c b/man/notify-selfcontained-example.c index 39f0dbe3fda..90c38613741 100644 --- a/man/notify-selfcontained-example.c +++ b/man/notify-selfcontained-example.c @@ -7,6 +7,7 @@ * This protocol is guaranteed to be stable as per: * https://systemd.io/PORTABILITY_AND_STABILITY/ */ +#define _GNU_SOURCE 1 #include #include #include diff --git a/man/vtable-example.c b/man/vtable-example.c index 417ee0ccf13..2e8994471a0 100644 --- a/man/vtable-example.c +++ b/man/vtable-example.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: MIT-0 */ +#define _GNU_SOURCE 1 #include #include #include