diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2002-04-24 21:59:54 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2002-04-24 21:59:54 +0000 |
commit | 0dc8c7c0726801a62672019dd62ef1a484646dea (patch) | |
tree | ff51a6b7fe2545eec62a7417f385dc00b1dafabd /lib/libossaudio/ossaudio.c | |
parent | b52b85be70837f3789f679055047a4763e81eefc (diff) |
make oss_ioctl varargs.
this is not standard C, but it works on the arches we support,
and osscompat is a dirty hack in the first place.
ok millert@, tested naddy@
Diffstat (limited to 'lib/libossaudio/ossaudio.c')
-rw-r--r-- | lib/libossaudio/ossaudio.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libossaudio/ossaudio.c b/lib/libossaudio/ossaudio.c index 1e2b9356c4e..76877f02ec3 100644 --- a/lib/libossaudio/ossaudio.c +++ b/lib/libossaudio/ossaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ossaudio.c,v 1.4 2001/08/18 19:33:30 brad Exp $ */ +/* $OpenBSD: ossaudio.c,v 1.5 2002/04/24 21:59:53 espie Exp $ */ /* $NetBSD: ossaudio.c,v 1.14 2001/05/10 01:53:48 augustss Exp $ */ /*- @@ -43,6 +43,7 @@ * With some preprocessor magic it could be the same file. */ +#include <stdarg.h> #include <string.h> #include <sys/types.h> #include <sys/ioctl.h> @@ -71,8 +72,14 @@ static int enum_to_mask(struct audiodevinfo *di, int enm); #define INTARG (*(int*)argp) int -_oss_ioctl(int fd, unsigned long com, void *argp) +_oss_ioctl(int fd, unsigned long com, ...) { + va_list ap; + void *argp; + + va_start(ap, com); + argp = va_arg(ap, void *); + va_end(ap); if (IOCGROUP(com) == 'P') return audio_ioctl(fd, com, argp); else if (IOCGROUP(com) == 'M') |