build: move -lm flag from Makefile to configure

This commit is contained in:
lohhiiccc 2026-03-12 16:39:26 +01:00
parent 3f666ff011
commit 3c7ce5b9fb
3 changed files with 5 additions and 5 deletions

View file

@ -37,9 +37,6 @@ LIBICMP_SRCS = $(shell find $(LIBICMP_DIR)/src -type f -name '*.c' 2>/dev/null)
LIBICMP_HEADERS = $(wildcard $(LIBICMP_DIR)/includes/*.h)
endif
# Extra link flags
LDFLAGS += -lm
# Build Directories
OBJ_DIR = build
OBJS = $(SRCS:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)

3
configure vendored
View file

@ -529,6 +529,9 @@ generate_build_mk() {
fi
fi
# Math library (required for stats mdev)
ldflags="$ldflags -lm"
# User-provided flags
if [ -n "$USER_CFLAGS" ]; then
cflags="$cflags $USER_CFLAGS"

View file

@ -5,11 +5,11 @@
void
ping_output_flood_dot(void)
{
write(1, ".", 1);
(void)write(1, ".", 1);
}
void
ping_output_flood_erase(void)
{
write(1, "\b \b", 3);
(void)write(1, "\b \b", 3);
}