Closed cybermag closed 7 years ago
BTW, it's even better to fix the compile error in following cross-platform way:
original code from select.cpp, function void zmq::select_t::loop ()
int timeout = (int) execute_timers ();
// Intialise the pollsets.
memcpy (&readfds, &source_set_in, sizeof source_set_in);
memcpy (&writefds, &source_set_out, sizeof source_set_out);
memcpy (&exceptfds, &source_set_err, sizeof source_set_err);
// Wait for events.
struct timeval tv = {(long) (timeout / 1000),
(long) (timeout % 1000 * 1000)};
the fixed code:
struct timeval tv = {(int) (timeout / 1000),
(int) (timeout % 1000 * 1000)};
The select problem was already fixed in 4.1.x and 4.2.x by https://github.com/zeromq/libzmq/pull/1181 feel free to cherry-pick the patch (please use git format-patch and git am to track the original author) and do a PR to this repository if you need it in 4.0.x. Also please add an entry in the NEWS file if you do so.
The platform.hpp is generated at build time by autoconf/cmake/etc, not a Mac user so I'm not sure how to integrate autoconf/cmake in Xcode but there must be documentation by Apple
Sorry, are the any way to add latest version (4.2.2) of libzmq to cocoa pods? It seems that it is needed just to update the podspec? Can I do that by myself?
I'm sorry but I'm not an OSX user/dev so no idea - if you can't find out, try asking on the mailing list http://zeromq.org/docs:mailing-lists or on IRC http://zeromq.org/chatroom
Thanks! I will ask community for the help.
Hello All!
I would like to use libzmq pod for my IOS project.
def myPods pod 'libsodium' pod 'libzmq' end
My Xcode version is 8.3.1.
I have faced with the following issues:
ifndef platform_h
define platform_h
define ZMQ_FORCE_SELECT
define ZMQ_HAVE_UIO
endif / platform_h /
Pods/libzmq/src/select.cpp:166:13: Non-constant-expression cannot be narrowed from type 'long' to '__darwin_suseconds_t' (aka 'int') in initializer list
I have fixed the issue using explicit cast :
After that the project has built correctly. I have tried a couple of tests from zmq and it seems that they work correctly.
I have two options:
Could you please advice the direction of solving such problem?