Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-devtools / rpm / files / 0001-Fix-build-with-musl-C-library.patch
1 From d076de030deb9cafd9b2e82be5d506cebdefad0b 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 1/9] Fix build with musl C library.
5
6 Upstream-Status: Pending
7 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9 ---
10  configure.ac       | 3 ++-
11  rpmio/digest_nss.c | 1 +
12  2 files changed, 3 insertions(+), 1 deletion(-)
13
14 diff --git a/configure.ac b/configure.ac
15 index c04a2e8d1..c9d9ac16d 100644
16 --- a/configure.ac
17 +++ b/configure.ac
18 @@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
19  # Check for libelf library. Prefer external, otherwise none.
20  WITH_LIBELF_LIB=
21  AC_CHECK_HEADER([libelf.h])
22 +AC_CHECK_HEADERS([error.h], [WITH_ERROR_H=yes])
23  AC_CHECK_HEADERS([gelf.h], [
24         AC_CHECK_LIB(elf, gelf_getvernaux, [
25             AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
26 @@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
27         ])
28  ])
29  AC_SUBST(WITH_LIBELF_LIB)
30 -AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
31 +AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes && test "$WITH_ERROR_H" = yes])
32  
33  AC_CHECK_HEADERS([dwarf.h], [
34    WITH_LIBDWARF=yes
35 diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
36 index 992d9acf6..e11920e3e 100644
37 --- a/rpmio/digest_nss.c
38 +++ b/rpmio/digest_nss.c
39 @@ -1,5 +1,6 @@
40  #include "system.h"
41  
42 +#include <signal.h>
43  #include <pthread.h>
44  #include <nss.h>
45  #include <sechash.h>
46 -- 
47 2.14.2
48