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