diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-04-25 09:26:18 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-05-06 12:38:32 +0200 |
commit | 831f710ecacc0cdc9b48d420a8ebefe029264174 (patch) | |
tree | c65c5a67494828e05fa1bb005883d42b7bbae3b4 /meta-oe | |
parent | a61cb514258cbd0758ca575c0786ad6f651462ac (diff) | |
download | meta-openembedded-831f710ecacc0cdc9b48d420a8ebefe029264174.tar.gz |
ltrace: Remove deprecated readdir_r()
New glibc >= 2.24 will remove it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch | 36 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch new file mode 100644 index 000000000..65c7d535e --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 64f98f84fd88797e219f9dde1ca387fee4b509f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 24 Apr 2016 16:58:17 -0700 | ||
4 | Subject: [PATCH] replace readdir_r with readdir | ||
5 | |||
6 | glibc 2.24 has deprecated readdir_r | ||
7 | |||
8 | https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | sysdeps/linux-gnu/proc.c | 5 +++-- | ||
15 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c | ||
18 | index 953fd86..edb716d 100644 | ||
19 | --- a/sysdeps/linux-gnu/proc.c | ||
20 | +++ b/sysdeps/linux-gnu/proc.c | ||
21 | @@ -242,9 +242,10 @@ process_tasks(pid_t pid, pid_t **ret_tasks, size_t *ret_n) | ||
22 | size_t alloc = 0; | ||
23 | |||
24 | while (1) { | ||
25 | - struct dirent entry; | ||
26 | struct dirent *result; | ||
27 | - if (readdir_r(d, &entry, &result) != 0) { | ||
28 | + errno = 0; | ||
29 | + result = readdir(d); | ||
30 | + if (errno != 0) { | ||
31 | fail: | ||
32 | free(tasks); | ||
33 | closedir(d); | ||
34 | -- | ||
35 | 2.8.0 | ||
36 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 19899f9bd..c27e21dc8 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb | |||
@@ -17,6 +17,7 @@ DEPENDS = "elfutils" | |||
17 | RDEPENDS_${PN} = "elfutils" | 17 | RDEPENDS_${PN} = "elfutils" |
18 | SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git;branch=master \ | 18 | SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git;branch=master \ |
19 | file://configure-allow-to-disable-selinux-support.patch \ | 19 | file://configure-allow-to-disable-selinux-support.patch \ |
20 | file://0001-replace-readdir_r-with-readdir.patch \ | ||
20 | " | 21 | " |
21 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
22 | 23 | ||