[Asterisk-bsd] Asterisk on OSX is broken -- Is fakepoll a viable fix?

Benjamin on Asterisk Mailing Lists benjk.on.asterisk.ml at gmail.com
Sat Nov 6 06:43:42 CST 2004


Some time earlier this year changes in the Asterisk source seem to
have occurred that led to building Asterisk on OSX/Darwin fail when
trying to compile sched.c ...

include/asterisk/channel.h:22: header file 'sys/poll.h' not found

I have googled for sys/poll.h and MacOSX and found that OSX doesn't
have sys/poll.h but apparently uses select() instead of poll()

In one of the google hits I found the following patch which I applied
to channel.h ...

+#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
+#elif HAVE_POLL_H
+#include <poll.h>
+#else
+#include "../common/fakepoll.h"
+#endif

and I did find the fakepoll.h/fakepoll.c wrapper code here ...

http://www.freehaven.net/tor/cvs/src/common/fakepoll.h
http://www.freehaven.net/tor/cvs/src/common/fakepoll.c

... in the header it says "/* See LICENSE for licensing information
*/" and I am not quite sure which license this refers to since there
is none specifically for the wrapper code on that site.

Has anybody used this fakepoll wrapper before? Any pointers to a
packaged version with a dedicated license? caveats? hints?

Alternatively, does anybody know of any other methods to fix Asterisk on OSX?

thanks
rgds
benjk

-- 
Sunrise Telephone Systems, 9F Shibuya Daikyo Bldg., 1-13-5 Shibuya,
Tokyo, Japan.

NB: Spam filters in place. Messages unrelated to the * mailing lists
may get trashed.


More information about the Asterisk-BSD mailing list