]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man/examples: set _GNU_SOURCE in source, rather than by compile option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Apr 2024 16:29:41 +0000 (01:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Apr 2024 17:30:29 +0000 (02:30 +0900)
Addresses https://github.com/systemd/systemd/pull/32057#issuecomment-2034408569.

man/event-quick-child.c
man/hwdb-usb-device.c
man/journal-iterate-poll.c
man/journal-stream-fd.c
man/meson.build
man/notify-selfcontained-example.c
man/vtable-example.c

index b95ee1bef632fd5deec39b7e6ffbe84650615020..828f0cd6f4b5737f2e1ffd22860cb22d8e6c7a11 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: MIT-0 */
 
+#define _GNU_SOURCE 1
 #include <assert.h>
 #include <stdio.h>
 #include <unistd.h>
index facd8c43b2995261c1165d8d314a76022e3ffeea..3ce3ccd87f5b727c9cbd614641e74d3927a3bf0b 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: MIT-0 */
 
+#define _GNU_SOURCE 1
 #include <stdio.h>
 #include <stdint.h>
 #include <systemd/sd-hwdb.h>
index d377324b780e54aafb5e766217f8f712d54ae00f..6b78296267ad3f1613c0bbb8bfc66c8a64107fa9 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: MIT-0 */
 
+#define _GNU_SOURCE 1
 #include <poll.h>
 #include <time.h>
 #include <systemd/sd-journal.h>
index c70d7986b2915ddb8d069aeae776fd4ffedc770b..595091af810b02113f2d76ff281495cf2bc87150 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: MIT-0 */
 
+#define _GNU_SOURCE 1
 #include <errno.h>
 #include <syslog.h>
 #include <stdio.h>
index 22ac236b273d9b8190c2df4236e2d51a10f6889e..a728fa33842a9d1272b6aa5aae5f0ef3b411fd5b 100644 (file)
@@ -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', ],
index 39f0dbe3fda4da7d9bd55b79e5595bc8fff5a06a..90c386137416a3ee017bae2895a2eeef21104e25 100644 (file)
@@ -7,6 +7,7 @@
  * This protocol is guaranteed to be stable as per:
  * https://systemd.io/PORTABILITY_AND_STABILITY/ */
 
+#define _GNU_SOURCE 1
 #include <errno.h>
 #include <inttypes.h>
 #include <signal.h>
index 417ee0ccf13a17fa5d51b4a4f8f97c5409cade76..2e8994471a03df0b3088d4288fca01e6e82c1581 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: MIT-0 */
 
+#define _GNU_SOURCE 1
 #include <errno.h>
 #include <stdbool.h>
 #include <stddef.h>