diff options
Diffstat (limited to 'meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch')
-rw-r--r-- | meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch new file mode 100644 index 0000000000..95c70136bd --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 211c2d11200e6657132c52e7ac68f8c118231262 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 27 Feb 2017 14:43:21 +0200 | ||
4 | Subject: [PATCH] Fix build with musl C library. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | |||
9 | |||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | configure.ac | 3 ++- | ||
13 | misc/Makefile.am | 3 +-- | ||
14 | misc/rpmxprogname.c | 3 +-- | ||
15 | 3 files changed, 4 insertions(+), 5 deletions(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 92ffd3d68..9c58467c1 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -229,6 +229,7 @@ AC_SEARCH_LIBS(dlopen, [dl]) | ||
22 | # Check for libelf library. Prefer external, otherwise none. | ||
23 | WITH_LIBELF_LIB= | ||
24 | AC_CHECK_HEADER([libelf.h]) | ||
25 | +AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes]) | ||
26 | AC_CHECK_HEADERS([gelf.h], [ | ||
27 | AC_CHECK_LIB(elf, gelf_getvernaux, [ | ||
28 | AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).]) | ||
29 | @@ -237,7 +238,7 @@ AC_CHECK_HEADERS([gelf.h], [ | ||
30 | ]) | ||
31 | ]) | ||
32 | AC_SUBST(WITH_LIBELF_LIB) | ||
33 | -AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes]) | ||
34 | +AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes]) | ||
35 | |||
36 | AC_CHECK_HEADERS([dwarf.h], [ | ||
37 | WITH_LIBDWARF=yes | ||
38 | diff --git a/misc/Makefile.am b/misc/Makefile.am | ||
39 | index 8bf0093d9..b9db3d31a 100644 | ||
40 | --- a/misc/Makefile.am | ||
41 | +++ b/misc/Makefile.am | ||
42 | @@ -5,10 +5,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc | ||
43 | |||
44 | EXTRA_DIST = \ | ||
45 | fnmatch.c fnmatch.h \ | ||
46 | - rpmxprogname.c rpmxprogname.h \ | ||
47 | stpcpy.c stpncpy.c | ||
48 | |||
49 | noinst_LTLIBRARIES = libmisc.la | ||
50 | |||
51 | -libmisc_la_SOURCES = fts.c fts.h | ||
52 | +libmisc_la_SOURCES = fts.c fts.h rpmxprogname.c rpmxprogname.h | ||
53 | libmisc_la_LIBADD = @LTLIBOBJS@ | ||
54 | diff --git a/misc/rpmxprogname.c b/misc/rpmxprogname.c | ||
55 | index f89600613..e94625ea8 100644 | ||
56 | --- a/misc/rpmxprogname.c | ||
57 | +++ b/misc/rpmxprogname.c | ||
58 | @@ -13,7 +13,7 @@ char *_rpmxgetprogname(void) | ||
59 | { | ||
60 | const char *empty = ""; | ||
61 | |||
62 | - if (_rpmxprognam != NULL) /* never return NULL string */ | ||
63 | + if (_rpmxprogname != NULL) /* never return NULL string */ | ||
64 | return _rpmxprogname; | ||
65 | else | ||
66 | return empty; | ||
67 | @@ -30,4 +30,3 @@ void _rpmxsetprogname(const char *pn) | ||
68 | } | ||
69 | } | ||
70 | |||
71 | -#endif /* _RPMXPROGNAME_H */ | ||
72 | -- | ||
73 | 2.11.0 | ||
74 | |||