--- channels/fax/faxmodem.h.orig 2009-06-27 22:21:25.000000000 +0400 +++ channels/fax/faxmodem.h 2009-06-27 22:21:29.000000000 +0400 @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include #include #include #include --- layout.freebsd.orig 2008-11-18 16:45:51.000000000 +0300 +++ layout.freebsd 2009-06-28 13:15:22.000000000 +0400 @@ -1,14 +1,14 @@ # FreeBSD directory layout helpstring="follow the FreeBSD ports system convention" cwprefix=/usr/local -cwexecdir=${prefix}/libexec -cwutilsdir=${prefix}/sbin +cwexecdir=${prefix}/sbin +cwutilsdir=${prefix}/bin cwconfdir=${prefix}/etc/callweaver cwlibdir=${prefix}/lib/callweaver -cwvardir=${prefix}/var/lib/callweaver +cwvardir=/var/lib/callweaver cwdatadir=${prefix}/share/callweaver -cwlogdir=${prefix}/var/log -cwrundir=${prefix}/var/run -cwspooldir=${prefix}/var/spool/callweaver +cwlogdir=/var/log/callweaver +cwrundir=/var/run +cwspooldir=/var/spool/callweaver cwmandir=${prefix}/man cwdocdir=${prefix}/share/doc/callweaver --- channels/fax/faxmodem.c.orig 2009-06-28 02:31:01.000000000 +0400 +++ channels/fax/faxmodem.c 2009-06-28 02:31:17.000000000 +0400 @@ -125,13 +125,11 @@ fm->master = -1; fm->slave = -1; - if (openpty(&fm->master, &fm->slave, NULL, NULL, NULL)) { + if (openpty(&fm->master, &fm->slave, buf, NULL, NULL)) { do_log(LOGGER.err, "Fatal error: failed to initialize pty\n"); return -1; } - ptsname_r(fm->master, buf, sizeof(buf)); - do_log(LOGGER.info, "Opened pty, slave device: %s\n", buf); snprintf(fm->devlink, sizeof(fm->devlink), "%s%d", device_prefix, NEXT_ID++); --- corelib/utils.c.orig 2009-06-28 11:32:54.000000000 +0400 +++ corelib/utils.c 2008-11-18 16:45:43.000000000 +0300 @@ -61,7 +61,7 @@ static char base64[64]; static char b2a[256]; -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) +#if defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) /* duh? ERANGE value copied from web... */ #define ERANGE 34