diff options
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/shmat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c index 2ac07f21d0..070b00c30f 100644 --- a/sysdeps/unix/sysv/linux/shmat.c +++ b/sysdeps/unix/sysv/linux/shmat.c @@ -33,5 +33,6 @@ shmat (shmid, shmaddr, shmflg) unsigned long raddr; retval = __ipc (IPCOP_shmat, shmid, shmflg, (int) &raddr, shmaddr); - return retval < 0 ? (void *) retval : (void *) raddr; + return ((unsigned long int) retval > -(unsigned long int) SHMLBA + ? (void *) retval : (void *) raddr); } |