diff -Naur vdr-2.4.1.orig/tools.h vdr-2.4.1/tools.h --- vdr-2.4.1.orig/tools.h 2020-03-23 18:30:23.199333734 +0100 +++ vdr-2.4.1/tools.h 2020-03-23 18:30:49.174333734 +0100 @@ -406,7 +406,9 @@ private: DIR *directory; struct dirent *result; -#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 +//#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 +#if !defined(__GLIBC__) || \ + (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 24)) || !defined(_GNU_SOURCE)) union { // according to "The GNU C Library Reference Manual" struct dirent d; char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];