NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Porting an OSS application



On Wed, 02 May 2012 12:42:36 +0200
Riccardo Mottola <riccardo.mottola%libero.it@localhost> wrote:

> When I compile it, I get:
> OSS.m: In function '-[OSS _setRateAndChannels]':
> OSS.m:111:37: error: macro "ioctl" requires 3 arguments, but only 2 given
> OSS.m:111:39: warning: comparison between pointer and integer
> gmake[4]: *** [obj/OSS.obj/OSS.m.o] Error 1
> 
> the offending line is:
> 
> if (ioctl (dspFd, SNDCTL_DSP_RESET) == -1)
> 
> Why the error? the argument number is variadic and it compiles on the 
> abovementioned platforms (as well as FreeBSD and others). It is such 
> also in the examples you find aorund on the net.

soundcard.h contains:

#include <sys/ioctl.h>
#define ioctl(x,y,z) _oss_ioctl(x,y,z)

__BEGIN_DECLS
int _oss_ioctl(int fd, unsigned long com, void *argp);
__END_DECLS

I don't know anything about this; I only grep'ed it. ;)

kind regards
dieter


Home | Main Index | Thread Index | Old Index