Gentoo Archives: gentoo-commits

From: Joerg Bornkessel <hd_brummy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/vdr/, media-video/vdr/files/
Date: Mon, 27 Aug 2018 13:32:10
Message-Id: 1535376713.ddda7c9abad6a161baaf65520b6ca6b4fad7b325.hd_brummy@gentoo
1 commit: ddda7c9abad6a161baaf65520b6ca6b4fad7b325
2 Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 27 13:30:59 2018 +0000
4 Commit: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 27 13:31:53 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddda7c9a
7
8 media-video/vdr: glibc-2.24 deprecated warning fixed
9
10 Package-Manager: Portage-2.3.48, Repoman-2.3.10
11
12 media-video/vdr/files/vdr-2.2.0_glibc-2.24.patch | 35 ++++++++++++++++++++++++
13 media-video/vdr/vdr-2.2.0-r3.ebuild | 1 +
14 2 files changed, 36 insertions(+)
15
16 diff --git a/media-video/vdr/files/vdr-2.2.0_glibc-2.24.patch b/media-video/vdr/files/vdr-2.2.0_glibc-2.24.patch
17 new file mode 100644
18 index 00000000000..98cc13b0c3b
19 --- /dev/null
20 +++ b/media-video/vdr/files/vdr-2.2.0_glibc-2.24.patch
21 @@ -0,0 +1,35 @@
22 +patch will fix readdir_r() is deprecated as of glibc-2.24
23 +https://www.vdr-portal.de/forum/index.php?thread/130752-handle-deprecated-functions-readdir-r-auto-ptr/&postID=1293833#post1293833
24 +
25 +Signed-of by: Joerg Bornkessel <hd_brummy@g.o> (27 Aug 2018)
26 +diff -Naur vdr-2.2.0.orig/tools.c vdr-2.2.0/tools.c
27 +--- vdr-2.2.0.orig/tools.c 2018-08-27 12:59:28.571326559 +0200
28 ++++ vdr-2.2.0/tools.c 2018-08-27 13:03:11.222326559 +0200
29 +@@ -1466,7 +1466,11 @@
30 + struct dirent *cReadDir::Next(void)
31 + {
32 + if (directory) {
33 ++#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
34 + while (readdir_r(directory, &u.d, &result) == 0 && result) {
35 ++#else
36 ++ while ((result = readdir(directory)) != NULL) {
37 ++#endif
38 + if (strcmp(result->d_name, ".") && strcmp(result->d_name, ".."))
39 + return result;
40 + }
41 +diff -Naur vdr-2.2.0.orig/tools.h vdr-2.2.0/tools.h
42 +--- vdr-2.2.0.orig/tools.h 2018-08-27 12:59:28.641326559 +0200
43 ++++ vdr-2.2.0/tools.h 2018-08-27 13:01:44.022326559 +0200
44 +@@ -369,10 +369,12 @@
45 + private:
46 + DIR *directory;
47 + struct dirent *result;
48 ++#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
49 + union { // according to "The GNU C Library Reference Manual"
50 + struct dirent d;
51 + char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
52 + } u;
53 ++#endif
54 + public:
55 + cReadDir(const char *Directory);
56 + ~cReadDir();
57
58 diff --git a/media-video/vdr/vdr-2.2.0-r3.ebuild b/media-video/vdr/vdr-2.2.0-r3.ebuild
59 index 2b4a137a165..dbb8e986c4a 100644
60 --- a/media-video/vdr/vdr-2.2.0-r3.ebuild
61 +++ b/media-video/vdr/vdr-2.2.0-r3.ebuild
62 @@ -218,6 +218,7 @@ src_prepare() {
63 eapply "${FILESDIR}/${P}_gentoo.patch"
64 #gcc-7.2, this will fix only the core vdr, not the extpatch
65 eapply "${FILESDIR}/${P}_unsignedtosigned.patch"
66 + eapply "${FILESDIR}/${P}_glibc-2.24.patch"
67
68 # fix some makefile issues
69 sed -e "s:ifndef NO_KBD:ifeq (\$(USE_KBD),1):" \