2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

make: remove checks and warnings for bsd strlcat and strlcpy

In 0a7c5fd1bd8d1e49e273b51ff39af473d6c68cbc we swapped the BSD
implementation of strlcat and strlcpy in favor of our own replacement.

The checks and the predefined macros are not needed anymore.

Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
This commit is contained in:
Lorenzo Fontana 2025-05-14 19:02:06 +02:00 committed by Radostin Stoyanov
parent f6c14eece3
commit 69500a9e13
2 changed files with 2 additions and 30 deletions

View File

@ -9,7 +9,7 @@ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
LIBS_FEATURES += -lbsd LIBS_FEATURES += -lbsd
FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD
else else
$(info Note: Building without setproctitle() and strlcpy() support.) $(info Note: Building without setproctitle() support.)
$(info $S Install libbsd-devel (RPM) / libbsd-dev (DEB) to fix.) $(info $S Install libbsd-devel (RPM) / libbsd-dev (DEB) to fix.)
endif endif
@ -84,7 +84,7 @@ endif
export DEFINES += $(FEATURE_DEFINES) export DEFINES += $(FEATURE_DEFINES)
export CFLAGS += $(FEATURE_DEFINES) export CFLAGS += $(FEATURE_DEFINES)
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \ FEATURES_LIST := TCP_REPAIR PTRACE_PEEKSIGINFO \
SETPROCTITLE_INIT TCP_REPAIR_WINDOW MEMFD_CREATE \ SETPROCTITLE_INIT TCP_REPAIR_WINDOW MEMFD_CREATE \
OPENAT2 NO_LIBC_RSEQ_DEFS OPENAT2 NO_LIBC_RSEQ_DEFS

View File

@ -35,34 +35,6 @@ int main(void)
} }
endef endef
define FEATURE_TEST_STRLCPY
#include <string.h>
#ifdef CONFIG_HAS_LIBBSD
# include <bsd/string.h>
#endif
int main(void)
{
return strlcpy(NULL, NULL, 0);
}
endef
define FEATURE_TEST_STRLCAT
#include <string.h>
#ifdef CONFIG_HAS_LIBBSD
# include <bsd/string.h>
#endif
int main(void)
{
return strlcat(NULL, NULL, 0);
}
endef
define FEATURE_TEST_PTRACE_PEEKSIGINFO define FEATURE_TEST_PTRACE_PEEKSIGINFO
#include <sys/ptrace.h> #include <sys/ptrace.h>