selinux/libsepol
Fabrice Fontaine 3e3661f602 libsepol/src/Makefile: fix reallocarray detection
Pass LDFLAGS when checking for reallocarray to avoid the following
static build failure with musl raised since version 3.4 and
f0a5f6e330
because -static is not passed when checking for reallocarray:

/home/autobuild/autobuild/instance-9/output-1/host/bin/armeb-buildroot-linux-musleabi-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O0 -g0  -static -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o assertion.o assertion.c
In file included from assertion.c:28:
private.h:88:21: error: static declaration of 'reallocarray' follows non-static declaration
   88 | static inline void* reallocarray(void *ptr, size_t nmemb, size_t size) {
      |                     ^~~~~~~~~~~~
In file included from ../include/sepol/policydb/mls_types.h:35,
                 from ../include/sepol/policydb/context.h:23,
                 from ../include/sepol/policydb/policydb.h:62,
                 from assertion.c:24:
/home/autobuild/autobuild/instance-9/output-1/host/armeb-buildroot-linux-musleabi/sysroot/usr/include/stdlib.h:150:7: note: previous declaration of 'reallocarray' with type 'void *(void *, size_t,  size_t)' {aka 'void *(void *, unsigned int,  unsigned int)'}
  150 | void *reallocarray (void *, size_t, size_t);
      |       ^~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/0170032548a38e2c991d62dc5823808458ad03b3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2024-01-25 13:05:50 -05:00
..
cil libsepol/cil: Clear AST node after destroying bad filecon rule 2023-12-12 10:26:39 -05:00
fuzz libsepol/fuzz: handle empty and non kernel policies 2023-12-06 13:32:50 -05:00
include libsepol: extended permission formatting cleanup 2023-12-12 10:33:21 -05:00
man Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
src libsepol/src/Makefile: fix reallocarray detection 2024-01-25 13:05:50 -05:00
tests libsepol/tests: Update the order of neverallow test results 2023-11-21 08:55:45 -05:00
utils libsepol/utils: improve wording 2022-07-06 15:57:24 -04:00
.gitignore libsepol: add policy utilities 2022-04-12 13:09:19 -04:00
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile
VERSION Update VERSIONs to 3.6 for release. 2023-12-13 15:46:22 +01:00