Skip to content

Commit

Permalink
io_uring_prep_cmd_sock: cast pointer to untptr_t first
Browse files Browse the repository at this point in the history
For 32-bit archs, cast it to an uintptr_t first to avoid warnings.

Fixes: 3797db1 ("liburing.h: Populate SQE for {s,g} etsockopt")
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Oct 20, 2023
1 parent 21deac5 commit 4cb70b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/liburing.h
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ IOURINGINLINE void io_uring_prep_cmd_sock(struct io_uring_sqe *sqe,
int optlen)
{
io_uring_prep_rw(IORING_OP_URING_CMD, sqe, fd, NULL, 0, 0);
sqe->optval = (long long unsigned int)optval;
sqe->optval = (unsigned long) (uintptr_t) optval;
sqe->optname = optname;
sqe->optlen = optlen;
sqe->cmd_op = cmd_op;
Expand Down

0 comments on commit 4cb70b7

Please sign in to comment.