ports/net/iaxmodem/files/patch-aa
Pav Lucistnik 7c95f9f90f - Attempt to fix build on FreeBSD 4.X
Reported by:	krismail
2006-08-06 16:59:31 +00:00

80 lines
2.6 KiB
Text

--- build.orig Mon Jun 12 17:03:49 2006
+++ build Thu Jun 15 14:24:34 2006
@@ -16,14 +17,14 @@
./configure && \
make && \
cd ../spandsp && \
- ./configure && \
+ ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" && \
make && \
cd ../.. && \
- gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \
+ gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \
-std=c99 -Ilib/libiax2/src -Ilib/spandsp/src -c -o iaxmodem.o iaxmodem.c && \
- gcc -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
+ gcc $CFLAGS $LDFLAGS -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
else
- gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \
+ gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \
-lm -liax -lutil -lspandsp -ltiff -o iaxmodem iaxmodem.c
fi
if [ -n "`ls /etc/iaxmodem-cfg.* 2>/dev/null`" ]; then
--- iaxmodem.c.orig Mon Jun 12 15:54:33 2006
+++ iaxmodem.c Thu Jun 15 14:26:12 2006
@@ -17,11 +17,13 @@
*/
#include <stdio.h>
#include <string.h>
-#ifndef __OpenBSD__
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
#include <pty.h>
#else
#include <termios.h>
+#if !defined(__FreeBSD__)
#include <util.h>
+#endif
#endif
#include <stdlib.h>
#include <unistd.h>
--- lib/libiax2/src/iax.c.orig Mon Jun 12 15:54:46 2006
+++ lib/libiax2/src/iax.c Thu Jun 15 14:22:17 2006
@@ -44,6 +44,7 @@
#else
#include <netdb.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
@@ -64,9 +64,9 @@
#include <arpa/inet.h>
#include <time.h>
-#if !defined(MACOSX) && !defined(__OpenBSD__)
+#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
#include <malloc.h>
-#if !defined(SOLARIS)
+#if !defined(SOLARIS) && !defined(__FreeBSD__)
#include <error.h>
#endif
#endif
@@ -97,7 +97,7 @@
#ifdef MACOSX
#define IAX_SOCKOPTS MSG_DONTWAIT
#else
-#if defined(SOLARIS) || defined(__OpenBSD__)
+#if defined(SOLARIS) || defined(__OpenBSD__) || defined(__FreeBSD__)
#define IAX_SOCKOPTS MSG_DONTWAIT
#else /* Linux and others */
#define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
--- lib/spandsp/src/spandsp/t4.h.orig Mon Jun 12 15:54:34 2006
+++ lib/spandsp/src/spandsp/t4.h Thu Jun 15 14:17:20 2006
@@ -28,6 +28,8 @@
/*! \file */
+#include <time.h>
+
#if !defined(_T4_H_)
#define _T4_H_