blob: 8140ea3438d34bb40c6f9038564e39abd5f87fbd [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
14diff --git a/iface.c b/iface.c
15index 5951d81..27793f0 100644
16--- a/iface.c
17+++ b/iface.c
18@@ -43,7 +43,14 @@
19 __result; }))
20 #endif
21
22-#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
23+#ifdef LIBEXECDIR
24+# define CAT_PATH(DIR1,DIR2) DIR1##DIR2
25+# define RAW_UTEMPTER_PATH CAT_PATH(LIBEXECDIR,/utempter/utempter)
26+#else
27+# define RAW_UTEMPTER_PATH /usr/lib/libtempter/utempter/utempter
28+#endif
29+#define STR_PATH(RAW_STR) #RAW_STR
30+#define UTEMPTER_DEFAULT_PATHNAME STR_PATH(RAW_UTEMPTER_PATH)
31
32 static const char *utempter_pathname;
33 static int saved_fd = -1;
34--
351.8.3.1
36