Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


uvwget: libcurl and libuv master problem #26

clemensg opened this Issue · 5 comments

3 participants


Hi, with the current master libuv, I get build errors when compiling uvwget/main.c, because the uv_poll_s struct seems to have changed again. curl_multi_socket_action(curl_handle, req->io_watcher.fd, flags, &running_handles); does not compile.
I tried to exchange the io_watcher.fd part with just socket but after that, it crashed in uv_poll_init_socket during uv__handle_init. So I guess my modification is wrong: curl_multi_socket_action(curl_handle, req->socket, flags, &running_handles);

Once, it was req->fd, then req->io_watcher.fd and now, it does not work anymore, again.

It would be great if somebody could give me a hint on how to adapt the example the right way. Especially on how to access the file descriptor without crashing on Windows. Is there something I forgot, which has to be done, in order to access req->socket ?

Hopefully, someone can shed some light on it. Thank you.


@clemensg I tried with the latest master and it compiles and works fine. Are you sure you're on the right branch?


Yes, I am on master..but:

This uv_poll struct is different, on Unix and Windows systems.
The io_watcher field is only defined here:
But not in here:

For my current project, I am working on Windows, maybe this is the problem.. Hopefully, someone can help me out on how to port this to Windows or at least tell me if it's not possible with the current design of libuv.


You should not use libuv's internal fields, it will probably break again even if you fix it now.


Thanks for pointing out the platform differences.
@clemensg for now you may want to use the approach as in the test - - of using another wrapper struct.


Fixed by #31

@nikhilm nikhilm closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.