[svn-commits] tzafrir: tools/trunk r7134 - /tools/trunk/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Sep 15 12:51:20 CDT 2009
Author: tzafrir
Date: Tue Sep 15 12:51:15 2009
New Revision: 7134
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7134
Log:
Fix some FreeBSD compatibility issues in -tools
Part of issue #15877.
Reported by: Max Khon
Patches:
dahdi-tools.diff uploaded by Max Khon (license 884)
Modified:
tools/trunk/Makefile
tools/trunk/dahdi_monitor.c
tools/trunk/tonezone.c
Modified: tools/trunk/Makefile
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/Makefile?view=diff&rev=7134&r1=7133&r2=7134
==============================================================================
--- tools/trunk/Makefile (original)
+++ tools/trunk/Makefile Tue Sep 15 12:51:15 2009
@@ -230,12 +230,14 @@
install -m 644 $(MAN_PAGES) $(DESTDIR)$(MAN_DIR)/
endif
ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
- $(INSTALL) -D -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE)
+ $(INSTALL) -d $(DESTDIR)$(CONFIG_DIR)
+ $(INSTALL) -m 644 system.conf.sample $(DESTDIR)$(CONFIG_FILE)
endif
install-libs: libs
- $(INSTALL) -D -m 755 $(LTZ_A) $(DESTDIR)$(LIB_DIR)/$(LTZ_A)
- $(INSTALL) -D -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
+ $(INSTALL) -d -m 755 $(DESTDIR)/$(LIB_DIR)
+ $(INSTALL) -m 755 $(LTZ_A) $(DESTDIR)$(LIB_DIR)/
+ $(INSTALL) -m 755 $(LTZ_SO) $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER)
ifeq (,$(DESTDIR))
if [ `id -u` = 0 ]; then \
/sbin/ldconfig || : ;\
@@ -260,7 +262,8 @@
/sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO)
endif
endif
- $(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h
+ $(INSTALL) -d -m 755 $(DESTDIR)/$(INC_DIR)
+ $(INSTALL) -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/
install-utils-subdirs:
@for dir in $(SUBDIRS_UTILS); do \
Modified: tools/trunk/dahdi_monitor.c
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/dahdi_monitor.c?view=diff&rev=7134&r1=7133&r2=7134
==============================================================================
--- tools/trunk/dahdi_monitor.c (original)
+++ tools/trunk/dahdi_monitor.c Tue Sep 15 12:51:15 2009
@@ -42,7 +42,11 @@
#include "dahdi_tools_version.h"
#include "wavformat.h"
+#if defined(__FreeBSD__)
+#include <sys/soundcard.h>
+#else
#include <linux/soundcard.h>
+#endif
/*
* defines for file handle numbers
Modified: tools/trunk/tonezone.c
URL: http://svn.asterisk.org/svn-view/dahdi/tools/trunk/tonezone.c?view=diff&rev=7134&r1=7133&r2=7134
==============================================================================
--- tools/trunk/tonezone.c (original)
+++ tools/trunk/tonezone.c Tue Sep 15 12:51:15 2009
@@ -50,6 +50,10 @@
# define PRINT_DEBUG(x, ...) printf(x, __VA_ARGS__)
#else
# define PRINT_DEBUG(x, ...)
+#endif
+
+#ifndef ENODATA
+#define ENODATA EINVAL
#endif
struct tone_zone *tone_zone_find(char *country)
@@ -431,7 +435,11 @@
dump_tone_zone(h, MAX_SIZE - space);
#endif
+#if defined(__FreeBSD__)
+ if ((res = ioctl(fd, DAHDI_LOADZONE, &h))) {
+#else
if ((res = ioctl(fd, DAHDI_LOADZONE, h))) {
+#endif
fprintf(stderr, "ioctl(DAHDI_LOADZONE) failed: %s\n", strerror(errno));
return res;
}
More information about the svn-commits
mailing list