mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
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>
This commit is contained in:
parent
a61cb51425
commit
831f710eca
|
|
@ -0,0 +1,36 @@
|
|||
From 64f98f84fd88797e219f9dde1ca387fee4b509f0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 24 Apr 2016 16:58:17 -0700
|
||||
Subject: [PATCH] replace readdir_r with readdir
|
||||
|
||||
glibc 2.24 has deprecated readdir_r
|
||||
|
||||
https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
sysdeps/linux-gnu/proc.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c
|
||||
index 953fd86..edb716d 100644
|
||||
--- a/sysdeps/linux-gnu/proc.c
|
||||
+++ b/sysdeps/linux-gnu/proc.c
|
||||
@@ -242,9 +242,10 @@ process_tasks(pid_t pid, pid_t **ret_tasks, size_t *ret_n)
|
||||
size_t alloc = 0;
|
||||
|
||||
while (1) {
|
||||
- struct dirent entry;
|
||||
struct dirent *result;
|
||||
- if (readdir_r(d, &entry, &result) != 0) {
|
||||
+ errno = 0;
|
||||
+ result = readdir(d);
|
||||
+ if (errno != 0) {
|
||||
fail:
|
||||
free(tasks);
|
||||
closedir(d);
|
||||
--
|
||||
2.8.0
|
||||
|
||||
|
|
@ -17,6 +17,7 @@ DEPENDS = "elfutils"
|
|||
RDEPENDS_${PN} = "elfutils"
|
||||
SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git;branch=master \
|
||||
file://configure-allow-to-disable-selinux-support.patch \
|
||||
file://0001-replace-readdir_r-with-readdir.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user