blob: 0b1d6298a9415c626cdc9cc5d81dd697bd6ee3f1 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 27 Feb 2017 14:43:21 +0200
Brad Bishop316dfdd2018-06-25 12:45:53 -04004Subject: [PATCH 1/9] Fix build with musl C library.
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005
Brad Bishop316dfdd2018-06-25 12:45:53 -04006Upstream-Status: Pending
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009---
Brad Bishop316dfdd2018-06-25 12:45:53 -040010 configure.ac | 3 ++-
11 rpmio/digest_nss.c | 1 +
12 2 files changed, 3 insertions(+), 1 deletion(-)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013
14diff --git a/configure.ac b/configure.ac
Brad Bishop316dfdd2018-06-25 12:45:53 -040015index c04a2e8d1..c9d9ac16d 100644
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016--- a/configure.ac
17+++ b/configure.ac
Brad Bishop316dfdd2018-06-25 12:45:53 -040018@@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019 # 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).])
Brad Bishop316dfdd2018-06-25 12:45:53 -040026@@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027 ])
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
Brad Bishop316dfdd2018-06-25 12:45:53 -040035diff --git a/rpmio/digest_nss.c b/rpmio/digest_nss.c
36index 992d9acf6..e11920e3e 100644
37--- a/rpmio/digest_nss.c
38+++ b/rpmio/digest_nss.c
39@@ -1,5 +1,6 @@
40 #include "system.h"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050041
Brad Bishop316dfdd2018-06-25 12:45:53 -040042+#include <signal.h>
43 #include <pthread.h>
44 #include <nss.h>
45 #include <sechash.h>
Brad Bishop6e60e8b2018-02-01 10:27:11 -050046--
Brad Bishop316dfdd2018-06-25 12:45:53 -0400472.14.2
Brad Bishop6e60e8b2018-02-01 10:27:11 -050048