diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-30 09:08:31 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-06-30 10:46:47 -0300 |
commit | d44e1a0740066416d3c331a3022ead5a7c4155ad (patch) | |
tree | 1c4b0a8d25730bcced4309cd03330e9999c90e6a | |
parent | 82c7441f04e3c2a653ee29672731e040a1799c6b (diff) | |
download | glibc-d44e1a0740066416d3c331a3022ead5a7c4155ad.tar.gz glibc-d44e1a0740066416d3c331a3022ead5a7c4155ad.tar.xz glibc-d44e1a0740066416d3c331a3022ead5a7c4155ad.zip |
linux: Fix mq_timereceive check for 32 bit fallback code (BZ 29304)
On success, mq_receive() and mq_timedreceive() return the number of bytes in the received message, so it requires to check if the value is larger than 0. Checked on i686-linux-gnu. (cherry picked from commit 71d87d85bf54f6522813aec97c19bdd24997341e)
-rw-r--r-- | sysdeps/unix/sysv/linux/mq_timedreceive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c index eb948ccc18..d3dde7a586 100644 --- a/sysdeps/unix/sysv/linux/mq_timedreceive.c +++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c @@ -33,7 +33,7 @@ __mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len, msg_prio, abs_timeout); #ifndef __ASSUME_TIME64_SYSCALLS - if (ret == 0 || errno != ENOSYS) + if (ret >= 0 || errno != ENOSYS) return ret; struct timespec ts32; |