[asterisk-dev] [dahdi-commits] tzafrir: tools/trunk r7134 - /tools/trunk/

Kevin P. Fleming kpfleming at digium.com
Tue Sep 15 13:14:14 CDT 2009


SVN commits to the DAHDI project wrote:

> 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

Please use configure script tests for this sort of thing, instead of
hardcoded defines in source files.

> +#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;
>  	}

This is not acceptable; the DAHDI_LOADZONE API must be the same between
all supported DAHDI platforms. If FreeBSD cannot support an ioctl that
has a bare 'int' argument, then there must be a new version of
DAHDI_LOADZONE added for FreeBSD *and* Linux that accepts an 'int *',
and the old version of DAHDI_LOADZONE must be supported on Linux via the
compatibility mechanism we already use.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming at digium.com
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list