mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
Fix build on OpenBSD and fix small typo. (Bug #3502)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -53,6 +53,9 @@ APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; f
|
|||||||
CURLLIBS=$(shell curl-config --libs)
|
CURLLIBS=$(shell curl-config --libs)
|
||||||
ifneq (${CURLLIBS},)
|
ifneq (${CURLLIBS},)
|
||||||
APPS+=app_curl.so
|
APPS+=app_curl.so
|
||||||
|
ifeq (${OSARCH},OpenBSD)
|
||||||
|
CFLAGS+=-I/usr/local/include
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS+=-fPIC
|
CFLAGS+=-fPIC
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__OSX__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__OSX__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <netinet/in_systm.h>
|
#include <netinet/in_systm.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OSX__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__OSX__)
|
||||||
#include <net/if_dl.h>
|
#include <net/if_dl.h>
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -4534,14 +4534,14 @@ static int set_config(char *config_file, struct sockaddr_in* sin)
|
|||||||
tos = IPTOS_THROUGHPUT;
|
tos = IPTOS_THROUGHPUT;
|
||||||
else if (!strcasecmp(v->value, "reliability"))
|
else if (!strcasecmp(v->value, "reliability"))
|
||||||
tos = IPTOS_RELIABILITY;
|
tos = IPTOS_RELIABILITY;
|
||||||
#if !defined(__NetBSD__) && !defined(SOLARIS)
|
#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(SOLARIS)
|
||||||
else if (!strcasecmp(v->value, "mincost"))
|
else if (!strcasecmp(v->value, "mincost"))
|
||||||
tos = IPTOS_MINCOST;
|
tos = IPTOS_MINCOST;
|
||||||
#endif
|
#endif
|
||||||
else if (!strcasecmp(v->value, "none"))
|
else if (!strcasecmp(v->value, "none"))
|
||||||
tos = 0;
|
tos = 0;
|
||||||
else
|
else
|
||||||
#if defined(__NetBSD__) && !defined(SOLARIS)
|
#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(SOLARIS)
|
||||||
ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno);
|
ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', 'mincost', or 'none'\n", v->lineno);
|
||||||
#else
|
#else
|
||||||
ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', or 'none'\n", v->lineno);
|
ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', or 'none'\n", v->lineno);
|
||||||
|
Reference in New Issue
Block a user