From: Fabrice Fontaine Date: Wed, 22 Jan 2020 19:59:31 +0000 (+0100) Subject: package/libpam-tacplus: fix build on uclibc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=059360f4e739e0fe93910cbe34fb36c9106f9bdc;p=buildroot.git package/libpam-tacplus: fix build on uclibc Fixes: - http://autobuild.buildroot.org/results/05c67484136f3bb433ce7fc47b2ce01167048cc2 Signed-off-by: Fabrice Fontaine Tested-by: Carlos Santos Signed-off-by: Peter Korsgaard --- diff --git a/package/libpam-tacplus/0001-libtac-lib-magic.c-fix-build-on-uclibc.patch b/package/libpam-tacplus/0001-libtac-lib-magic.c-fix-build-on-uclibc.patch new file mode 100644 index 0000000000..8cdbba4506 --- /dev/null +++ b/package/libpam-tacplus/0001-libtac-lib-magic.c-fix-build-on-uclibc.patch @@ -0,0 +1,52 @@ +From b2af0aca53d696e6dad17d8a0351d233d1dd1200 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 22 Jan 2020 20:51:59 +0100 +Subject: [PATCH] libtac/lib/magic.c: fix build on uclibc + +Commit 7e990f9db6d8805d369876f45964df87efad9e08 replaced _GNU_SOURCE by +AC_SYSTEM_EXTENSIONS. This is fine but then config.h must be included +before system includes otherwise build fails with uclibc on: + +libtac/lib/magic.c: In function 'magic': +libtac/lib/magic.c:70:11: error: implicit declaration of function 'getrandom' [-Werror=implicit-function-declaration] + ret = getrandom(&num, sizeof(num), GRND_NONBLOCK); + ^ + +Fixes: + - http://autobuild.buildroot.org/results/05c67484136f3bb433ce7fc47b2ce01167048cc2 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/kravietz/pam_tacplus/pull/137] +--- + libtac/lib/magic.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libtac/lib/magic.c b/libtac/lib/magic.c +index 9df5e3f..e13a483 100644 +--- a/libtac/lib/magic.c ++++ b/libtac/lib/magic.c +@@ -18,6 +18,10 @@ + * See `CHANGES' file for revision history. + */ + ++#ifdef HAVE_CONFIG_H ++ #include "config.h" ++#endif ++ + #include + #include + #include +@@ -27,10 +31,6 @@ + #include + #include + +-#ifdef HAVE_CONFIG_H +- #include "config.h" +-#endif +- + #include "magic.h" + + #ifdef _MSC_VER +-- +2.24.1 +