From 25ab7b726c76a9d5151eb2e03a56a85fd3469c19 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 19 May 2024 09:05:44 +0200 Subject: [PATCH] Print GLIBC version in pihole-FTL -vv and not during compile time as "#pragma message" is not supported by older clang versions Signed-off-by: DL6ER --- src/args.c | 7 ++++++- src/main.c | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/args.c b/src/args.c index e4bbd0cd..4333fc4b 100644 --- a/src/args.c +++ b/src/args.c @@ -715,7 +715,12 @@ void parse_args(int argc, char* argv[]) printf("Branch: " GIT_BRANCH "\n"); printf("Commit: " GIT_HASH " (" GIT_DATE ")\n"); printf("Architecture: " FTL_ARCH "\n"); - printf("Compiler: " FTL_CC "\n\n"); + printf("Compiler: " FTL_CC "\n"); +#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) + printf("GLIBC version: %d.%d\n\n", __GLIBC__, __GLIBC_MINOR__); +#else + printf("GLIBC version: -\n\n"); +#endif // Print dnsmasq version and compile time options print_dnsmasq_version(yellow, green, bold, normal); diff --git a/src/main.c b/src/main.c index 3d18c74e..61e7b405 100644 --- a/src/main.c +++ b/src/main.c @@ -28,12 +28,6 @@ // export_queries_to_disk() #include "database/query-table.h" -#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -#pragma message "Minimum GLIBC version: " xstr(__GLIBC__) "." xstr(__GLIBC_MINOR__) -#else -#pragma message "Minimum GLIBC version: unknown, assuming this is a MUSL build" -#endif - char *username; bool needGC = false; bool needDBGC = false;