Skip to content

Conversation

@PaulXiCao
Copy link

Building with liburing support fails with the following warnings:

...
ccache /usr/bin/cc -DLIBUS_NO_SSL -DLIBUS_USE_IO_URING -DuSocketsC_EXPORTS -I/home/paul/informatik/uSockets/src -std=gnu11 -fPIC -MD -MT CMakeFiles/uSocketsC.dir/src/io_uring/io_loop.c.o -MF CMakeFiles/uSocketsC.dir/src/io_uring/io_loop.c.o.d -o CMakeFiles/uSocketsC.dir/src/io_uring/io_loop.c.o -c /home/paul/informatik/uSockets/src/io_uring/io_loop.c
/home/paul/informatik/uSockets/src/io_uring/io_loop.c: In function ‘us_create_loop’:
/home/paul/informatik/uSockets/src/io_uring/io_loop.c:343:20: error: passing argument 1 of ‘posix_memalign’ from incompatible pointer type [-Wincompatible-pointer-types]
  343 |     posix_memalign(&reg.ring_addr, 1024 * 4, sizeof(struct io_uring_buf) * 4096);
      |                    ^~~~~~~~~~~~~~
      |                    |
      |                    __u64 * {aka long long unsigned int *}
In file included from /home/paul/informatik/uSockets/src/io_uring/internal.h:5,
                 from /home/paul/informatik/uSockets/src/io_uring/io_loop.c:23:
/usr/include/stdlib.h:718:35: note: expected ‘void **’ but argument is of type ‘__u64 *’ {aka ‘long long unsigned int *’}
  718 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
      |                            ~~~~~~~^~~~~~~~
/home/paul/informatik/uSockets/src/io_uring/io_loop.c:346:20: error: assignment to ‘struct io_uring_buf_ring *’ from ‘__u64’ {aka ‘long long unsigned int’} makes pointer from integer without a cast [-Wint-conversion]
  346 |     loop->buf_ring = reg.ring_addr;
      |                    ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant