Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 713086 | Differences between
and this patch

Collapse All | Expand All

(-)vdr-2.4.1.orig/tools.c (-1 / +3 lines)
Lines 1540-1550 Link Here
1540
struct dirent *cReadDir::Next(void)
1540
struct dirent *cReadDir::Next(void)
1541
{
1541
{
1542
  if (directory) {
1542
  if (directory) {
1543
#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
1543
#if defined(__GLIBC__)
1544
#if defined(__GLIBC_PREREQ) &&!__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
1544
     while (readdir_r(directory, &u.d, &result) == 0 && result) {
1545
     while (readdir_r(directory, &u.d, &result) == 0 && result) {
1545
#else
1546
#else
1546
     while ((result = readdir(directory)) != NULL) {
1547
     while ((result = readdir(directory)) != NULL) {
1547
#endif
1548
#endif
1549
#endif
1548
           if (strcmp(result->d_name, ".") && strcmp(result->d_name, ".."))
1550
           if (strcmp(result->d_name, ".") && strcmp(result->d_name, ".."))
1549
              return result;
1551
              return result;
1550
           }
1552
           }
(-)vdr-2.4.1.orig/tools.h (-1 / +3 lines)
Lines 406-417 Link Here
406
private:
406
private:
407
  DIR *directory;
407
  DIR *directory;
408
  struct dirent *result;
408
  struct dirent *result;
409
#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
409
#if defined(__GLIBC__)
410
#if defined(__GLIBC_PREREQ) &&!__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
410
  union { // according to "The GNU C Library Reference Manual"
411
  union { // according to "The GNU C Library Reference Manual"
411
    struct dirent d;
412
    struct dirent d;
412
    char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
413
    char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
413
    } u;
414
    } u;
414
#endif
415
#endif
416
#endif
415
public:
417
public:
416
  cReadDir(const char *Directory);
418
  cReadDir(const char *Directory);
417
  ~cReadDir();
419
  ~cReadDir();

Return to bug 713086