From 4c243a34a38b9803b2b99754d6168f888cff36f8 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Fri, 15 Aug 2025 16:58:02 +0300 Subject: [PATCH] Fix building tests on FreeBSD --- test/_test_main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/_test_main.cpp b/test/_test_main.cpp index 68211e03..bf2dce49 100644 --- a/test/_test_main.cpp +++ b/test/_test_main.cpp @@ -31,6 +31,7 @@ #else #include #include +#include #endif #if defined(__has_include) && __has_include() @@ -43,7 +44,7 @@ char argv0[MAX_PATH]; inline const char *getprogname() { return GetModuleFileName(NULL, argv0, sizeof(argv0)) ? argv0 : NULL; } -#elif !defined(__APPLE__) +#elif !defined(__APPLE__) && !defined(__FreeBSD__) // N.B. getprogname() is an Apple/BSD-ism. // program_invocation_name is a GLIBC-ism, but it's also // supported by libmusl.