From d7935930ad73c228708fd05370104c8564bbb7ec Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Tue, 15 Jul 2025 23:54:55 +0100 Subject: [PATCH] F42: fix for etext symbol glibc 2.29+ The man page end(3) changed as well over time to support the new definition. This was revised from 2.41+ to 2.29+ as it seems top relate to a mix of Kernel / Glibc / Compiler and the new defintion probably works on any older system. --- utils/netlist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/netlist.c b/utils/netlist.c index b835732f..cb7bbd51 100644 --- a/utils/netlist.c +++ b/utils/netlist.c @@ -22,6 +22,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/utils/netlist.c,v 1.1.1.1 2008/02/03 20:43:50 tim Exp $"; #endif /* lint */ +#include #include #include #include "utils/magic.h" @@ -369,6 +370,8 @@ NLNetName(net) static char tempId[100]; #if defined(EMSCRIPTEN) int etext; +#elif defined(linux) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 29) + extern char etext; #elif defined(linux) && defined(__clang__) extern char etext; #elif defined(linux) || defined(CYGWIN)