1 Manually tell the compiler that strlcpy exists. The `try-build` function seems
2 somewhat broken, i.e. any code that I try to pass to it doesn't link because of an
3 "undefined reference to main" error (and some more quoting issues with newlines being
6 Because both musl and glibc seemt o support strlcpy nowadays, I decided to just skip the
7 possibly broken feature-check and hardcode that it exists.
9 diff --git a/Makefile b/Makefile
10 index ed2414b..37be9cd 100644
13 @@ -239,10 +239,8 @@ endif
14 # On a given system, some libs may link statically, some may not; so, check
15 # both and only build those that link!
17 -ifeq ($(call try-build,$(SOURCE_STRLCPY),$(CFLAGS),$(LDFLAGS)),y)
18 - CFLAGS_DYNOPT += -DHAVE_STRLCPY
19 - CFLAGS_STATOPT += -DHAVE_STRLCPY
21 +CFLAGS_DYNOPT += -DHAVE_STRLCPY
22 +CFLAGS_STATOPT += -DHAVE_STRLCPY
24 ifeq ($(call try-build,$(SOURCE_BFD),$(CFLAGS),$(LDFLAGS) -lbfd -static),y)
25 CFLAGS_STATOPT += -DCONFIG_HAS_BFD