[Asterisk-bsd] Fixing Asterisk on OSX -- using poll-compat wrapper, but alloca.h missing

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


After spending all that time poking around in the fakepoll wrapper
found on freehaven.net, I found that there is already a wrapper called
poll-compat.h in the Asterisk distribution ;-)

There are two ways to use this wrapper ...

1 - the lazy way: change the name to poll.h

2 - the paranoid way: apply this patch:

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

to the file include/asterisk/channel.h,

and the following patch:

+#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
+#elif HAVE_POLL_H
+#include <poll.h>
+#else
+#include "include/asterisk/poll-compat.h"
+#endif

to the following files:

 channel.c
 manager.c
 asterisk.c

Using the poll-compat wrapper goes some distance, but the build stops
again when alloca.h is referred to in utils.c ...

utils.c:26: header file 'alloca.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
<built-in>:1:1: no macro name given in #define directive
make: *** [utils.o] Error 1

Any ideas what the story is on this one?

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