summaryrefslogtreecommitdiff
path: root/sysdeps/pthread/aio_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/aio_misc.c')
-rw-r--r--sysdeps/pthread/aio_misc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/pthread/aio_misc.c b/sysdeps/pthread/aio_misc.c
index 5ebceeee40..e703089dea 100644
--- a/sysdeps/pthread/aio_misc.c
+++ b/sysdeps/pthread/aio_misc.c
@@ -311,7 +311,10 @@ __aio_enqueue_request (aiocb_union *aiocbp, int operation)
if (operation == LIO_SYNC || operation == LIO_DSYNC)
aiocbp->aiocb.aio_reqprio = 0;
else if (aiocbp->aiocb.aio_reqprio < 0
- || aiocbp->aiocb.aio_reqprio > AIO_PRIO_DELTA_MAX)
+#ifdef AIO_PRIO_DELTA_MAX
+ || aiocbp->aiocb.aio_reqprio > AIO_PRIO_DELTA_MAX
+#endif
+ )
{
/* Invalid priority value. */
__set_errno (EINVAL);