strophe / libstrophe

A simple, lightweight C library for writing XMPP clients
http://strophe.im/libstrophe
Other
401 stars 163 forks source link

Build failed on macOS 10.14.6 #149

Closed ghost closed 4 years ago

ghost commented 4 years ago

I tried to build on macOS 10.14.6 with XCode 10.1 with command /configure --with-libxml2 --enable-cares but it failed like below:

/Volumes/Data/Code/external/libstrophe/src/resolver.c:489:20: error: variable has incomplete type 'struct timeval' struct timeval tv; ^ /usr/local/include/ares.h:278:8: note: forward declaration of 'struct timeval' struct timeval; ^ /Volumes/Data/Code/external/libstrophe/src/resolver.c:511:13: warning: implicit declaration of function 'select' is invalid in C99 [-Wimplicit-function-declaration] select(nfds, &rfds, &wfds, NULL, tvp); ^ 1 warning and 1 error generated. make[5]: *** [CMakeFiles/strophe.dir/src/resolver.c.o] Error 1 make[4]: *** [CMakeFiles/strophe.dir/all] Error 2 make[3]: *** [all] Error 2 make[2]: *** [libstrophe-prefix/src/libstrophe-stamp/libstrophe-build] Error 2 make[1]: *** [CMakeFiles/libstrophe.dir/all] Error 2 make: *** [all] Error 2

jubalh commented 4 years ago

Can you test whether https://github.com/strophe/libstrophe/pull/150 solves this?

pasis commented 4 years ago

The fix is landed to master, please, check if it works for you.

ghost commented 4 years ago

It works for me, thank you