mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Disable mac lookup, fix compile on NetBSD (bug #2680)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
Makefile
2
Makefile
@@ -76,7 +76,7 @@ DEBUG=-g #-pg
|
|||||||
#OPTIONS += -DLOW_MEMORY
|
#OPTIONS += -DLOW_MEMORY
|
||||||
|
|
||||||
# Optional debugging parameters
|
# Optional debugging parameters
|
||||||
DEBUG_THREADS = #-DDEBUG_THREADS #-DDO_CRASH
|
DEBUG_THREADS = -DDEBUG_THREADS #-DDO_CRASH
|
||||||
|
|
||||||
# Uncomment next one to enable ast_frame tracing (for debugging)
|
# Uncomment next one to enable ast_frame tracing (for debugging)
|
||||||
TRACE_FRAMES = #-DTRACE_FRAMES
|
TRACE_FRAMES = #-DTRACE_FRAMES
|
||||||
|
@@ -39,6 +39,9 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#if defined(__NetBSD__)
|
||||||
|
#include <netinet/in_systm.h>
|
||||||
|
#endif
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@@ -350,6 +353,7 @@ static void dundi_reject(struct dundi_hdr *h, struct sockaddr_in *sin)
|
|||||||
|
|
||||||
static void reset_global_eid(void)
|
static void reset_global_eid(void)
|
||||||
{
|
{
|
||||||
|
#if !defined(__NetBSD__)
|
||||||
int x,s;
|
int x,s;
|
||||||
char eid_str[20];
|
char eid_str[20];
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
@@ -367,6 +371,7 @@ static void reset_global_eid(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ast_log(LOG_NOTICE, "No ethernet interface found for seeding global EID You will have to set it manually.\n");
|
ast_log(LOG_NOTICE, "No ethernet interface found for seeding global EID You will have to set it manually.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3173,7 +3178,7 @@ static void build_mapping(char *name, char *value)
|
|||||||
struct dundi_mapping *map;
|
struct dundi_mapping *map;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
t = strdupa(value);
|
t = ast_strdupa(value);
|
||||||
if (t) {
|
if (t) {
|
||||||
map = mappings;
|
map = mappings;
|
||||||
while(map) {
|
while(map) {
|
||||||
@@ -3661,12 +3666,18 @@ 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__)
|
||||||
else if (!strcasecmp(v->value, "mincost"))
|
else if (!strcasecmp(v->value, "mincost"))
|
||||||
tos = IPTOS_MINCOST;
|
tos = IPTOS_MINCOST;
|
||||||
|
#endif
|
||||||
else if (!strcasecmp(v->value, "none"))
|
else if (!strcasecmp(v->value, "none"))
|
||||||
tos = 0;
|
tos = 0;
|
||||||
else
|
else
|
||||||
|
#if defined(__NetBSD__)
|
||||||
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
|
||||||
|
ast_log(LOG_WARNING, "Invalid tos value at line %d, should be 'lowdelay', 'throughput', 'reliability', or 'none'\n", v->lineno);
|
||||||
|
#endif
|
||||||
} else if (!strcasecmp(v->name, "department")) {
|
} else if (!strcasecmp(v->name, "department")) {
|
||||||
strncpy(dept, v->value, sizeof(dept) - 1);
|
strncpy(dept, v->value, sizeof(dept) - 1);
|
||||||
} else if (!strcasecmp(v->name, "organization")) {
|
} else if (!strcasecmp(v->name, "organization")) {
|
||||||
|
Reference in New Issue
Block a user