Hello community,

here is the log from the commit of package ltrace for openSUSE:Factory checked 
in at 2016-07-24 19:42:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ltrace (Old)
 and      /work/SRC/openSUSE:Factory/.ltrace.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ltrace"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ltrace/ltrace.changes    2014-09-04 
07:55:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ltrace.new/ltrace.changes       2016-07-24 
19:42:35.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Jul 13 10:00:22 UTC 2016 - sch...@suse.de
+
+- readdir.patch: Remove use of deprecated readdir_r
+
+-------------------------------------------------------------------

New:
----
  readdir.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ltrace.spec ++++++
--- /var/tmp/diff_new_pack.2bW8Sc/_old  2016-07-24 19:42:36.000000000 +0200
+++ /var/tmp/diff_new_pack.2bW8Sc/_new  2016-07-24 19:42:36.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ltrace
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -42,6 +42,7 @@
 %define git_id g6c6bcc3
 Source:         ltrace-%{version}-%{git_id}.tar.bz2
 Source2:        baselibs.conf
+Patch:          readdir.patch
 
 %description
 Ltrace is a program that runs the specified command until it exits. It
@@ -57,6 +58,7 @@
 
 %prep
 %setup -q
+%patch -p1
 
 %build
 ./autogen.sh

++++++ readdir.patch ++++++
Index: ltrace-0.7.91/sysdeps/linux-gnu/proc.c
===================================================================
--- ltrace-0.7.91.orig/sysdeps/linux-gnu/proc.c
+++ ltrace-0.7.91/sysdeps/linux-gnu/proc.c
@@ -242,24 +242,20 @@ process_tasks(pid_t pid, pid_t **ret_tas
        size_t alloc = 0;
 
        while (1) {
-               struct dirent entry;
-               struct dirent *result;
-               if (readdir_r(d, &entry, &result) != 0) {
-               fail:
-                       free(tasks);
-                       closedir(d);
-                       return -1;
-               }
-               if (result == NULL)
+               struct dirent *entry = readdir(d);
+               if (entry == NULL)
                        break;
-               if (result->d_type == DT_DIR && all_digits(result->d_name)) {
-                       pid_t npid = atoi(result->d_name);
+               if (entry->d_type == DT_DIR && all_digits(entry->d_name)) {
+                       pid_t npid = atoi(entry->d_name);
                        if (n >= alloc) {
                                alloc = alloc > 0 ? (2 * alloc) : 8;
                                pid_t *ntasks = realloc(tasks,
                                                        sizeof(*tasks) * alloc);
-                               if (ntasks == NULL)
-                                       goto fail;
+                               if (ntasks == NULL) {
+                                       free(tasks);
+                                       closedir(d);
+                                       return -1;
+                               }
                                tasks = ntasks;
                        }
                        assert(n < alloc);

Reply via email to