public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: [testsuite] [RHEL-5] Fix gdb-orphanripper.c runtime error.
Date: Sat, 27 Jun 2026 23:56:12 GMT	[thread overview]
Message-ID: <178260457272.1.6943200348970776750.rpms-gdb-01f32662b6ec@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 01f32662b6eca36ea177085a8e01f8142eb20255
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2013-05-06T17:30:58+02:00
Stats  : +7/-4 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/01f32662b6eca36ea177085a8e01f8142eb20255?branch=gdb-17.2-rebase-f44

Log:
[testsuite] [RHEL-5] Fix gdb-orphanripper.c runtime error.

---
diff --git a/gdb-orphanripper.c b/gdb-orphanripper.c
index d79d93c..2653dd2 100644
--- a/gdb-orphanripper.c
+++ b/gdb-orphanripper.c
@@ -108,7 +108,7 @@ static int child_exited (void)
   char buf[200];
   int fd, i, retval;
   ssize_t got;
-  char *state;
+  char state[3];
 
   snprintf (buf, sizeof (buf), "/proc/%ld/stat", (long) child);
   fd = open (buf, O_RDONLY);
@@ -128,14 +128,14 @@ static int child_exited (void)
       perror ("close (/proc/CHILD/stat)");
       exit (EXIT_FAILURE);
     }
-  i = sscanf (buf, "%*d%*s%ms", &state);
+  /* RHEL-5 does not support %ms.  */
+  i = sscanf (buf, "%*d%*s%2s", state);
   if (i != 1)
     {
       perror ("sscanf (/proc/CHILD/stat)");
       exit (EXIT_FAILURE);
     }
   retval = strcmp (state, "Z") == 0;
-  free (state);
   return retval;
 }
 

diff --git a/gdb.spec b/gdb.spec
index f99843c..5a57ff6 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -36,7 +36,7 @@ Version: 7.6
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 26%{?dist}
+Release: 27%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
 Group: Development/Debuggers
@@ -1394,6 +1394,9 @@ fi
 %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch"
 
 %changelog
+* Mon May  6 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.6-27.fc19
+- [testsuite] [RHEL-5] Fix gdb-orphanripper.c runtime error.
+
 * Fri May  3 2013 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.6-26.fc19
 - Fix gcore for vDSO (on ppc64).
 

                 reply	other threads:[~2026-06-27 23:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260457272.1.6943200348970776750.rpms-gdb-01f32662b6ec@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox