Re: [Plib-users] PLib compilation fails on OpenBSD
Brought to you by:
sjbaker
From: Heikki K. <he...@sa...> - 2001-04-09 04:27:39
|
> On Sun, 8 Apr 2001, I wrote on a plib (http://plib.sourceforge.net) > compilation problem: > > sl.h:96: macro `ioctl' used with only 2 args On Sun, 8 Apr 2001, Steve Baker wrote: > I think (from the sound of the error), that OpenBSD has somehow defined 'ioctl' > as a macro - that's **WRONG** because in C++ you should be able to overload > the names of system functions (as we have done here) - but if the host OS > defines them as macro's, that won't work. /usr/include/soundcard.h:#define ioctl(fd, com, argp) _oss_ioctl(fd, com, argp) /usr/include/sys/ioctl.h:int ioctl __P((int, unsigned long, ...)); soundcard.h gives you Linux OSS emulation. Preferred way on OpenBSD is to use sys/audioio.h, which is the native audio interface and generally best kept up-to-date. slPortability.h tries to use OSS instead, however. A simple workaround as follows. I guess you would have to have a way to use OSS too under OpenBSD, though. diff -uNr plib-1.2.0.orig/src/sl/slPortability.h plib-1.2.0/src/sl/slPortability.h --- plib-1.2.0.orig/src/sl/slPortability.h Wed Jun 28 04:32:58 2000 +++ plib-1.2.0/src/sl/slPortability.h Mon Apr 9 06:50:37 2001 @@ -42,7 +42,7 @@ #include <limits.h> #include <math.h> -#if (defined(__linux__) || defined(BSD)) && !defined(__NetBSD__) +#if (defined(__linux__) || defined(BSD)) && !defined(__NetBSD__) && !defined(__OpenBSD__) #define SL_USING_OSS_AUDIO 1 #endif With CFLAGS set to include and link with /usr/local and /usr/X11R6/lib, this should build under OpenBSD 2.8-current. Haven't yet tried actually running anything with it, tho. I guess I should update my XF to OpenBSD snapshot of XF4 and try and compile plib against it while I'm at it. <!-- ---------------------- 72 characters -------------------------- --> Heikki Korpela -- he...@sa... |