From 0db5ace61da72a0020f6ab9fcf3b629f776242cf Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 22 Apr 2019 15:30:02 +0200 Subject: [PATCH] configure: fix vasprintf test; cosmetics. The vasprintf test was always failing because it needed stdarg.h. Misc cosmetics: rename compat objs to COMPAT_OBJS. --- configure | 11 ++++++----- lib/Makefile | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 4a1b2933..7b3cb538 100755 --- a/configure +++ b/configure @@ -389,6 +389,7 @@ else cat <_$func.c #define _GNU_SOURCE #include +#include int main(void) { va_list ap; vasprintf(NULL, NULL, ap); @@ -407,7 +408,7 @@ fi if test -n "$HAVE_VASPRINTF"; then echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK else - echo "COMPAT_SRCS+= compat/vasprintf.o" >>$CONFIG_MK + echo "COMPAT_OBJS+= compat/vasprintf.o" >>$CONFIG_MK fi # @@ -430,7 +431,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK else echo no. - echo "COMPAT_SRCS += compat/strcasestr.o" >>$CONFIG_MK + echo "COMPAT_OBJS += compat/strcasestr.o" >>$CONFIG_MK fi rm -f _$func _$func.c @@ -453,7 +454,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_STRLCPY" >> $CONFIG_MK else echo no. - echo "COMPAT_SRCS += compat/strlcpy.o" >>$CONFIG_MK + echo "COMPAT_OBJS += compat/strlcpy.o" >>$CONFIG_MK fi rm -f _$func.c _$func @@ -475,7 +476,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_STRLCAT" >>$CONFIG_MK else echo no. - echo "COMPAT_SRCS += compat/strlcat.o" >>$CONFIG_MK + echo "COMPAT_OBJS += compat/strlcat.o" >>$CONFIG_MK fi rm -f _$func.c _$func @@ -518,7 +519,7 @@ if $XCC _$func.c -lutil -o _$func 2>/dev/null; then echo "CPPFLAGS+= -DHAVE_HUMANIZE_NUMBER" >>$CONFIG_MK else echo no. - echo "COMPAT_SRCS+= compat/humanize_number.o" >>$CONFIG_MK + echo "COMPAT_OBJS+= compat/humanize_number.o" >>$CONFIG_MK fi rm -f _$func.c _$func diff --git a/lib/Makefile b/lib/Makefile index c9e622a3..6619cfba 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -44,7 +44,7 @@ OBJS += plist_remove.o plist_fetch.o util.o util_hash.o OBJS += repo.o repo_pkgdeps.o repo_sync.o OBJS += rpool.o cb_util.o proplib_wrapper.o OBJS += package_alternatives.o -OBJS += $(EXTOBJS) $(COMPAT_SRCS) +OBJS += $(EXTOBJS) $(COMPAT_OBJS) .PHONY: all all: libxbps.so libxbps.a