Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Mon, 27 Feb 2017 14:43:21 +0200 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | Subject: [PATCH 1/9] Fix build with musl C library. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | Upstream-Status: Pending |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 8 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 9 | --- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 10 | configure.ac | 3 ++- |
| 11 | rpmio/digest_nss.c | 1 + |
| 12 | 2 files changed, 3 insertions(+), 1 deletion(-) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | |
| 14 | diff --git a/configure.ac b/configure.ac |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | index c04a2e8d1..c9d9ac16d 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | --- a/configure.ac |
| 17 | +++ b/configure.ac |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | @@ -255,6 +255,7 @@ AC_SEARCH_LIBS(dlopen, [dl]) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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).]) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 26 | @@ -263,7 +264,7 @@ AC_CHECK_HEADERS([gelf.h], [ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 41 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | +#include <signal.h> |
| 43 | #include <pthread.h> |
| 44 | #include <nss.h> |
| 45 | #include <sechash.h> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | -- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 47 | 2.14.2 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 48 | |