This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.24-598-gcbce12d


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  cbce12d22b91a2393158ed7cb0a81bb26478dafd (commit)
      from  e082ac7533e75d3dbe5b949b09e843a65348d43b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cbce12d22b91a2393158ed7cb0a81bb26478dafd

commit cbce12d22b91a2393158ed7cb0a81bb26478dafd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Jan 2 16:19:48 2017 -0200

    Fix test-sysvsem on some platforms
    
    The command IPC_STAT of semctl expects an union semun in its fourth
    argument instead of struct semid_ds *.  This can cause failures on
    powerpc32-linux-gnu.
    
    Checked on x86_64-linux-gnu, i686-linux-gnu, and powerpc32-linux-gnu
    (qemu system emulation).

diff --git a/ChangeLog b/ChangeLog
index b3b6df5..7762fb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-02  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* sysvipc/test-sysvsem.c (do_test): Define and use union semun on
+	semctl.
+
 2017-01-02  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/test-nearbyint-except.c: Include <stdbool.h>.
diff --git a/sysvipc/test-sysvsem.c b/sysvipc/test-sysvsem.c
index 92396a6..279eca9 100644
--- a/sysvipc/test-sysvsem.c
+++ b/sysvipc/test-sysvsem.c
@@ -55,6 +55,13 @@ do_prepare (int argc, char *argv[])
 
 #define SEM_MODE 0644
 
+union semun
+{
+  int val;
+  struct semid_ds *buf;
+  unsigned short  *array;
+};
+
 static int
 do_test (void)
 {
@@ -74,7 +81,7 @@ do_test (void)
 
   /* Get semaphore kernel information and do some sanity checks.  */
   struct semid_ds seminfo;
-  if (semctl (semid, 0, IPC_STAT, &seminfo) == -1)
+  if (semctl (semid, 0, IPC_STAT, (union semun) { .buf = &seminfo }) == -1)
     FAIL_EXIT1 ("semctl with IPC_STAT failed (errno=%d)", errno);
 
   if (seminfo.sem_perm.__key != key)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    5 +++++
 sysvipc/test-sysvsem.c |    9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]