signal.h - Rename 'union sigval' members to fit requirements in SuSv2 and POSIX.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Mon, 21 Dec 2009 22:27:20 +0000 (23:27 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Wed, 23 Dec 2009 00:24:02 +0000 (01:24 +0100)
Also leave the old members there to keep compatibility.

Taken-from: FreeBSD

share/examples/scsi_target/scsi_target.c
sys/kern/vfs_aio.c
sys/sys/signal.h

index 44a1545..d59ceda 100644 (file)
@@ -831,7 +831,7 @@ get_ctio()
        se = &c_descr->aiocb.aio_sigevent;
        se->sigev_notify = SIGEV_KEVENT;
        se->sigev_notify_kqueue = kq_fd;
-       se->sigev_value.sigval_ptr = ctio;
+       se->sigev_value.sival_ptr = ctio;
 
        return (ctio);
 }
index 2e9dcc2..55ebe9d 100644 (file)
@@ -1183,7 +1183,7 @@ _aio_aqueue(struct aiocb *job, struct aio_liojob *lj, int type)
 
        if (aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_KEVENT) {
                kev.ident = aiocbe->uaiocb.aio_sigevent.sigev_notify_kqueue;
-               kev.udata = aiocbe->uaiocb.aio_sigevent.sigev_value.sigval_ptr;
+               kev.udata = aiocbe->uaiocb.aio_sigevent.sigev_value.sival_ptr;
        }
        else {
                /*
index 98ea2cb..1d07bb0 100644 (file)
@@ -204,9 +204,13 @@ typedef void __sighandler_t (int);
 
 #if defined(_P1003_1B_VISIBLE) || defined(_KERNEL)
 union sigval {
-       /* Members as suggested by Annex C of POSIX 1003.1b. */
-       int     sigval_int;
-       void    *sigval_ptr;
+       /* Members as suggested by SuSv2 and IEEE Std 1003.1 */
+       int     sival_int;
+       void    *sival_ptr;
+       /* Leave old members for backward compatibility */
+       int     sigval_int;
+       void    *sigval_ptr;
+
 };
 
 struct sigevent {