~xdavidwu/systemd-apkbuilds

ref: 41b96cafd0e6d4a12252bbbb6564230ecc968f30 systemd-apkbuilds/systemd/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch -rw-r--r-- 1.3 KiB
41b96cafPinghao Wu systemd: 256.2 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 787606c6ff822fb3fe41ba951ee289bbf6d4def3 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jul 2024 22:44:31 -0700
Subject: [PATCH 26/27] undef stdin for references using stdin as a struct
 member

In musl stdio.h, we have:
include/stdio.h:#define stdin  (stdin)

This causes error when a struct member is also named stdin. undef it.

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/shared/edit-util.c         | 2 ++
 src/systemctl/systemctl-edit.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c
index cfb2828f4e..1794a7b269 100644
--- a/src/shared/edit-util.c
+++ b/src/shared/edit-util.c
@@ -3,6 +3,8 @@
 #include <errno.h>
 #include <stdio.h>
 
+#undef stdin
+
 #include "alloc-util.h"
 #include "copy.h"
 #include "edit-util.h"
diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index 15398f8364..e7d53ca9a1 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -13,6 +13,8 @@
 #include "systemctl.h"
 #include "terminal-util.h"
 
+#undef stdin
+
 int verb_cat(int argc, char *argv[], void *userdata) {
         _cleanup_hashmap_free_ Hashmap *cached_id_map = NULL, *cached_name_map = NULL;
         _cleanup_(lookup_paths_done) LookupPaths lp = {};
-- 
2.45.1