diff options
| author | Qian Lei <qianl.fnst@cn.fujitsu.com> | 2015-01-09 11:01:08 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-01-12 15:34:01 +0100 |
| commit | da4dab68d601b9bd2903f761f043f0d438033bd5 (patch) | |
| tree | 78db6905b7be503e0e81f8f63658e3cd13bdd908 /meta-oe/recipes-support/libutempter | |
| parent | a5e8a79f04164d63e1a87f495c3dd766bd7b6df8 (diff) | |
| download | meta-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>
Diffstat (limited to 'meta-oe/recipes-support/libutempter')
| -rw-r--r-- | meta-oe/recipes-support/libutempter/libutempter/0001-Fix-macro-error.patch | 36 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb | 10 |
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 0000000000..8140ea3438 --- /dev/null +++ b/meta-oe/recipes-support/libutempter/libutempter/0001-Fix-macro-error.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From fc2bd592ad17d1c2a2a989750e69dfaedc28c633 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 3 | Date: Fri, 9 Jan 2015 10:40:29 +0800 | ||
| 4 | Subject: [PATCH] Fix macro error | ||
| 5 | |||
| 6 | compile error when build on almost all architectures. | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 10 | --- | ||
| 11 | iface.c | 9 ++++++++- | ||
| 12 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/iface.c b/iface.c | ||
| 15 | index 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 | -- | ||
| 35 | 1.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 30a68961d2..f84e6493c7 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" | |||
| 7 | LICENSE = "GPLv2 & GPLv2+ & LGPLv2 & MIT" | 7 | LICENSE = "GPLv2 & GPLv2+ & LGPLv2 & MIT" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" |
| 9 | 9 | ||
| 10 | SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2" | 10 | SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2 \ |
| 11 | file://0001-Fix-macro-error.patch" | ||
| 11 | SRC_URI[md5sum] = "b43827806923903aba2bc7cd3a2d45b7" | 12 | SRC_URI[md5sum] = "b43827806923903aba2bc7cd3a2d45b7" |
| 12 | SRC_URI[sha256sum] = "b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397" | 13 | SRC_URI[sha256sum] = "b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397" |
| 13 | 14 | ||
| 14 | CFLAGS += "-DLIBEXECDIR=$(libexecdir)" | 15 | CFLAGS += "-DLIBEXECDIR=${libexecdir}" |
| 15 | 16 | ||
| 16 | do_compile() { | 17 | do_compile() { |
| 17 | oe_runmake \ | 18 | oe_runmake \ |
| 18 | libdir=${libdir} \ | 19 | libdir=${libdir} \ |
| 19 | libexecdir=${libexecdir} \ | 20 | libexecdir=${libexecdir} |
| 20 | } | 21 | } |
| 21 | 22 | ||
| 22 | do_install() { | 23 | do_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 | ||
| 33 | FILES_${PN} = "${libdir}/*.so.*" | 34 | FILES_${PN} = "${libdir}/*.so.*" |
| 34 | FILES_${PN} += "${libexecdir}/utempter/utempter" | 35 | FILES_${PN} += "${libexecdir}/utempter/utempter" |
| 35 | |||
| 36 | FILES_${PN}-dbg += "${libexecdir}/utempter/.debug/utempter" | 36 | FILES_${PN}-dbg += "${libexecdir}/utempter/.debug/utempter" |
