diff options
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | dahdi_monitor.c | 4 | ||||
-rw-r--r-- | tonezone.c | 8 |
3 files changed, 19 insertions, 4 deletions
@@ -230,12 +230,14 @@ ifneq (,$(BINS)) 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 @@ ifneq (no,$(USE_SELINUX)) /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 \ diff --git a/dahdi_monitor.c b/dahdi_monitor.c index ce900d6..98a2f72 100644 --- a/dahdi_monitor.c +++ b/dahdi_monitor.c @@ -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 @@ -52,6 +52,10 @@ # define PRINT_DEBUG(x, ...) #endif +#ifndef ENODATA +#define ENODATA EINVAL +#endif + struct tone_zone *tone_zone_find(char *country) { struct tone_zone *z; @@ -431,7 +435,11 @@ int tone_zone_register_zone(int fd, struct tone_zone *z) 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; } |