blob: 00119af11c324b0c405627ac1edf0c62722e29af [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From fc2bd592ad17d1c2a2a989750e69dfaedc28c633 Mon Sep 17 00:00:00 2001
2From: Qian Lei <qianl.fnst@cn.fujitsu.com>
3Date: Fri, 9 Jan 2015 10:40:29 +0800
4Subject: [PATCH] Fix macro error
5
6compile error when build on almost all architectures.
7
8Upstream-Status: Pending
9Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
10---
11 iface.c | 9 ++++++++-
12 1 file changed, 8 insertions(+), 1 deletion(-)
13
Patrick Williamsb48b7b42016-08-17 15:04:38 -050014--- a/iface.c
15+++ b/iface.c
16@@ -43,7 +43,14 @@
17 __result; }))
18 #endif
19
Andrew Geissler87f5cff2022-09-30 13:13:31 -050020-#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050021+#ifdef LIBEXECDIR
22+# define CAT_PATH(DIR1,DIR2) DIR1##DIR2
23+# define RAW_UTEMPTER_PATH CAT_PATH(LIBEXECDIR,/utempter/utempter)
24+#else
25+# define RAW_UTEMPTER_PATH /usr/lib/libtempter/utempter/utempter
26+#endif
27+#define STR_PATH(RAW_STR) #RAW_STR
28+#define UTEMPTER_DEFAULT_PATHNAME STR_PATH(RAW_UTEMPTER_PATH)
29
30 static const char *utempter_pathname;
31 static int saved_fd = -1;