aboutsummaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2024-04-07 23:28:51 -0400
committerRobert Marko <robimarko@gmail.com>2024-04-25 21:33:51 +0200
commit20ed56ec8b80936132d3dd66e3a7b82dd1d2ed89 (patch)
tree121cb8c21426ba0def60d1cab3f0f507a233704b /tools/include
parent43be31982366a9604ca5a980dd356d4a72a6d379 (diff)
tools/elfutils: use locally declared static reallocarray()
On macOS, stdlib.h in the standard include paths does not provide reallocarray() while both elfutils and gnulib do, however they are declared differently, leading to an error: ./system.h:101:1: error: static declaration of 'reallocarray' follows non-static declaration reallocarray (void *ptr, size_t nmemb, size_t size) A normal "configure && make" build cycle results in both declarations being enabled as a result of both elfutils and gnulib having completely separate configure checks where gnulib uses an internal placeholder symbol HAVE_REALLOCARRAY, and elfutils uses a standard autoconf macro HAVE_DECL_REALLOCARRAY. Fix this by excluding the import of the reallocarray module which causes gnulib checks in the configure stage to not even consider whether to declare reallocarray later on, so the decision is only between the standard include stdlib.h and the elfutils header. Tested-by: Georgi Valkov <gvalkov@gmail.com> # MacOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions