mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
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 71d87d85bf
)
This commit is contained in:
parent
94ab2088c3
commit
4b246b2bbd
@ -41,7 +41,7 @@ ___mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len
|
|||||||
{
|
{
|
||||||
int r = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
|
int r = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
|
||||||
msg_prio, abs_timeout);
|
msg_prio, abs_timeout);
|
||||||
if (r == 0 || errno != ENOSYS)
|
if (r >= 0 || errno != ENOSYS)
|
||||||
return r;
|
return r;
|
||||||
__set_errno (EOVERFLOW);
|
__set_errno (EOVERFLOW);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user