fix mips sysv ipc bits headers
authorRich Felker <dalias@aerifal.cx>
Sat, 14 Sep 2013 18:44:03 +0000 (14:44 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 14 Sep 2013 18:44:03 +0000 (14:44 -0400)
msg.h was wrong for big-endian (wrong endiannness padding).
shm.h was just plain wrong (mips is not supposed to have padding).

both changes were tested using libc-test on qemu-system-mips.

arch/mips/bits/msg.h
arch/mips/bits/shm.h

index 3db8576b782380ebc0bd675b1253072bf8f630b2..bfe2b3a75576e5aae7845b4b3abfcaf888b685fa 100644 (file)
@@ -1,12 +1,21 @@
 struct msqid_ds
 {
        struct ipc_perm msg_perm;
+#if _MIPSEL || __MIPSEL || __MIPSEL__
        time_t msg_stime;
        int __unused1;
        time_t msg_rtime;
        int __unused2;
        time_t msg_ctime;
        int __unused3;
+#else
+       int __unused1;
+       time_t msg_stime;
+       int __unused2;
+       time_t msg_rtime;
+       int __unused3;
+       time_t msg_ctime;
+#endif
        unsigned long msg_cbytes;
        msgqnum_t msg_qnum;
        msglen_t msg_qbytes;
index 8807c4fb2691870fc1ce9b3f157de75cddec76a1..abf1d506db8d888087687bd4f209668074348d40 100644 (file)
@@ -5,11 +5,8 @@ struct shmid_ds
        struct ipc_perm shm_perm;
        size_t shm_segsz;
        time_t shm_atime;
-       int __unused1;
        time_t shm_dtime;
-       int __unused2;
        time_t shm_ctime;
-       int __unused3;
        pid_t shm_cpid;
        pid_t shm_lpid;
        unsigned long shm_nattch;