summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQian Lei <qianl.fnst@cn.fujitsu.com>2015-01-09 11:01:08 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2015-01-12 15:34:01 +0100
commitda4dab68d601b9bd2903f761f043f0d438033bd5 (patch)
tree78db6905b7be503e0e81f8f63658e3cd13bdd908
parenta5e8a79f04164d63e1a87f495c3dd766bd7b6df8 (diff)
downloadmeta-openembedded-da4dab68d601b9bd2903f761f043f0d438033bd5.tar.gz
libutempter: Fix compile error
| iface.c: In function 'utempter_add_record': | <command-line>:0:12: error: expected expression before '/' token | iface.c:46:35: note: in expansion of macro 'LIBEXECDIR' | #define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter" Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-support/libutempter/libutempter/0001-Fix-macro-error.patch36
-rw-r--r--meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb10
2 files changed, 41 insertions, 5 deletions
diff --git a/meta-oe/recipes-support/libutempter/libutempter/0001-Fix-macro-error.patch b/meta-oe/recipes-support/libutempter/libutempter/0001-Fix-macro-error.patch
new file mode 100644
index 000000000..8140ea343
--- /dev/null
+++ b/meta-oe/recipes-support/libutempter/libutempter/0001-Fix-macro-error.patch
@@ -0,0 +1,36 @@
1From 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
diff --git a/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb b/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
index 30a68961d..f84e6493c 100644
--- a/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
+++ b/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
@@ -7,16 +7,17 @@ SECTION = "System Environment/Libraries"
7LICENSE = "GPLv2 & GPLv2+ & LGPLv2 & MIT" 7LICENSE = "GPLv2 & GPLv2+ & LGPLv2 & MIT"
8LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" 8LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
9 9
10SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2" 10SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2 \
11 file://0001-Fix-macro-error.patch"
11SRC_URI[md5sum] = "b43827806923903aba2bc7cd3a2d45b7" 12SRC_URI[md5sum] = "b43827806923903aba2bc7cd3a2d45b7"
12SRC_URI[sha256sum] = "b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397" 13SRC_URI[sha256sum] = "b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397"
13 14
14CFLAGS += "-DLIBEXECDIR=$(libexecdir)" 15CFLAGS += "-DLIBEXECDIR=${libexecdir}"
15 16
16do_compile() { 17do_compile() {
17 oe_runmake \ 18 oe_runmake \
18 libdir=${libdir} \ 19 libdir=${libdir} \
19 libexecdir=${libexecdir} \ 20 libexecdir=${libexecdir}
20} 21}
21 22
22do_install() { 23do_install() {
@@ -27,10 +28,9 @@ do_install() {
27 includedir=${includedir} \ 28 includedir=${includedir} \
28 mandir=${mandir} 29 mandir=${mandir}
29 30
30 rm -f ${D}${libdir}/*.a 31 rm -f ${D}${libdir}/*.a
31} 32}
32 33
33FILES_${PN} = "${libdir}/*.so.*" 34FILES_${PN} = "${libdir}/*.so.*"
34FILES_${PN} += "${libexecdir}/utempter/utempter" 35FILES_${PN} += "${libexecdir}/utempter/utempter"
35
36FILES_${PN}-dbg += "${libexecdir}/utempter/.debug/utempter" 36FILES_${PN}-dbg += "${libexecdir}/utempter/.debug/utempter"