From ecb1f1e92ab449023d1427f9db26c5bac09c4901 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 01:50:25 +0200 Subject: Use new entropy fascility and add tests for it --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8f967f7..60a61cd 100644 --- a/Makefile +++ b/Makefile @@ -51,9 +51,10 @@ FEATURES+=-DWANT_FULLSCRAPE # full scrape transfer, if you rely on an older versions, enable this flag #FEATURES+=-DWANT_NO_AUTO_FREE -# Is enabled on BSD systems by default in trackerlogic.h -# on Linux systems the include Makefile adds -lbsd -#include Makefile.arc4random +# opentracker takes its randomness from arc4random, which is part of libc on +# the BSDs, on macOS and on glibc 2.36 and newer. On an older glibc or on musl +# it comes from libbsd instead, so uncomment the next include to link it. +#LDFLAGS+=-lbsd #FEATURES+=-D_DEBUG_HTTPERROR #FEATURES+=-D_DEBUG_RANDOMTORRENTS @@ -67,9 +68,9 @@ CFLAGS+=-I$(LIBOWFAT_HEADERS) -DGIT_VERSION=$(GIT_VERSION) -Wall -pipe -pthread LDFLAGS+=-L$(LIBOWFAT_LIBRARY) -lowfat -pthread BINARY =opentracker -HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_stats.h ot_vector.h ot_clean.h ot_udp.h ot_iovec.h ot_fullscrape.h ot_accesslist.h ot_http.h ot_livesync.h ot_rijndael.h -SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.c ot_stats.c ot_vector.c ot_clean.c ot_udp.c ot_iovec.c ot_fullscrape.c ot_accesslist.c ot_http.c ot_livesync.c ot_rijndael.c -SOURCES_proxy=proxy.c ot_vector.c ot_mutex.c +HEADERS=trackerlogic.h scan_urlencoded_query.h ot_mutex.h ot_random.h ot_stats.h ot_vector.h ot_clean.h ot_udp.h ot_iovec.h ot_fullscrape.h ot_accesslist.h ot_http.h ot_livesync.h ot_rijndael.h +SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.c ot_random.c ot_stats.c ot_vector.c ot_clean.c ot_udp.c ot_iovec.c ot_fullscrape.c ot_accesslist.c ot_http.c ot_livesync.c ot_rijndael.c +SOURCES_proxy=proxy.c ot_vector.c ot_mutex.c ot_random.c OBJECTS = $(SOURCES:%.c=%.o) OBJECTS_debug = $(SOURCES:%.c=%.debug.o) @@ -104,8 +105,8 @@ proxy.debug: $(OBJECTS_proxy_debug) $(HEADERS) # has to. tests/stubs.c supplies the few symbols those modules reference but # the tests never reach. TESTBIN=tests/runner -TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_scan_urlencoded_query.c tests/t_iovec.c tests/t_vector.c -TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c +TEST_SOURCES=tests/runner.c tests/test.c tests/stubs.c tests/t_scan_urlencoded_query.c tests/t_iovec.c tests/t_vector.c tests/t_random.c +TEST_UNITS=scan_urlencoded_query.c ot_iovec.c ot_vector.c ot_random.c TEST_HEADERS=tests/test.h $(HEADERS) CFLAGS_test = $(CFLAGS) -I. -g -O1 $(FEATURES) -- cgit v1.3