diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-06-25 11:54:32 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-06-25 11:54:32 +0200 |
commit | 027ae738a87db113984d7c079db16b855e0cee3d (patch) | |
tree | 9ace36614729ac6bcb1c99fe04c3bffee9fb6673 /tools.h | |
parent | ce5e23f2097f6491f87e0fb5e72c0781975667c9 (diff) | |
download | vdr-027ae738a87db113984d7c079db16b855e0cee3d.tar.gz vdr-027ae738a87db113984d7c079db16b855e0cee3d.tar.bz2 |
Now using readdir() instead of readdir_r(), if GLIBC version 2.24 or newer is used
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 4.12 2017/06/11 10:00:49 kls Exp $ + * $Id: tools.h 4.13 2017/06/25 11:45:38 kls Exp $ */ #ifndef __TOOLS_H @@ -400,10 +400,12 @@ class cReadDir { private: DIR *directory; struct dirent *result; +#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 union { // according to "The GNU C Library Reference Manual" struct dirent d; char b[offsetof(struct dirent, d_name) + NAME_MAX + 1]; } u; +#endif public: cReadDir(const char *Directory); ~cReadDir(); |