Patches to build 1.4.10.1 under Solaris 10 X86

Listed below is how I built Asterisk V1.4.10.1 under Solaris S10 X86:

I have the oss sound driver and the blastwave curl package installed.

Prior to the build I configured things:

LDFLAGS=‘-R/usr/sfw/lib -R/opt/csw/lib -L/opt/csw/lib -L/usr/sfw/lib’ CPPFLAGS=‘-I /opt/csw/include’ ./configure -with-curl=/opt/csw --with-oss --without-vpb --prefix=/opt/asterisk-1.4 --without-postgres

These are the diffs:

diff -r a2/Makefile asterisk-1.4.10/Makefile
227,228c227
< ASTCFLAGS+=-Wcast-align -g -DSOLARIS -I…/include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include -I/opt/csw/include
< ASTLDFLAGS+=-R/usr/sfw/lib -R/opt/csw/lib -L/opt/csw/lib -L/usr/sfw/lib -lrt

ASTCFLAGS+=-Wcast-align -DSOLARIS -I…/include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include

diff -r a2/makeopts.in asterisk-1.4.10/makeopts.in
6c6
< HOST_CC=gcc

HOST_CC=cc

diff -r a2/apps/app_queue.c asterisk-1.4.10/apps/app_queue.c
4471,4473c4471,4473
< { “show”, “queue”, “” },
< queue_show, “”,
< “”, complete_queue_show };

{ "show", "queue", NULL },
queue_show, NULL,
NULL, complete_queue_show };

4476,4478c4476,4478
< { “add”, “queue”, “member”, “” },
< handle_queue_add_member, “”,
< “”, complete_queue_add_member };

{ "add", "queue", "member", NULL },
handle_queue_add_member, NULL,
NULL, complete_queue_add_member };

4481,4483c4481,4483
< { “remove”, “queue”, “member”, “” },
< handle_queue_remove_member, “”,
< “”, complete_queue_remove_member };

{ "remove", "queue", "member", NULL },
handle_queue_remove_member, NULL,
NULL, complete_queue_remove_member };

4487,4489c4487,4489
< { { “show”, “queues”, “” },
< queue_show, “”,
< “”, “” },

{ { "show", "queues", NULL },
queue_show, NULL,
NULL, NULL },

4491c4491
< { { “queue”, “show”, “” },

{ { "queue", "show", NULL },

4495c4495
< { { “queue”, “add”, “member”, “” },

{ { "queue", "add", "member", NULL },

4499c4499
< { { “queue”, “remove”, “member”, “” },

{ { "queue", "remove", "member", NULL },

diff -r a2/channels/chan_oss.c asterisk-1.4.10/channels/chan_oss.c
59c59
< #include <sys/soundcard.h>

#include <soundcard.h>
213d212
< /#undef M_START/
339,346c338
< /enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;/
< #undef M_UNSET
< #undef M_FULL
< #undef M_READ
< #undef M_WRITE
<
< enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;
<


enum { M_UNSET, M_FULL, M_READ, M_WRITE } duplex;

diff -r a2/main/utils.c asterisk-1.4.10/main/utils.c
70d69
< #define HAVE_GETHOSTBYNAME_R 1

diff -r a2/utils/smsq.c asterisk-1.4.10/utils/smsq.c
29d28
< #undef swab

Asterisk builds with a couple of warnings but the compile is successful.

I’ve been running the V1.4.9, V1.4.10 and V1.4.10.1 asterisk binaries built this way for a while without any problems.