From 4277dfe8077cb088c6fe1ca8dbb478f9c5433423 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 21 Dec 2020 17:02:47 +0000 Subject: [PATCH] test: switch to getprogname on FreeBSD `program_invocation_short_name` is an alias for `__progname` in glibc. FreeBSD also has `__progname` defined by startup code but (like `environ`) it's not declared in any system header. Consumers are encouraged to use `getprogname()` instead. --- src/test/tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/tests.c b/src/test/tests.c index a6ab261..a482674 100644 --- a/src/test/tests.c +++ b/src/test/tests.c @@ -7,7 +7,7 @@ #include "tests.h" #ifdef __FreeBSD__ -const char *program_invocation_short_name = "unknown"; +#define program_invocation_short_name getprogname() #endif void test_setup_logging(int level) { -- 2.45.2