Subject: soundcard.h and _POSIX_SOURCE
To: None <>
From: Krister Walfridsson <>
List: tech-userlevel
Date: 03/17/1999 22:13:37
I have a problem with soundcard.h -- it defines _POSIX_SOURCE to prevent
dragging in a lot of junk when including machine/endian.h. This may
cause unexpected things to happen when you include files after

sys/midiio.h solves the same problem by

   #ifndef _POSIX_SOURCE
   #define _POSIX_SOURCE         /* make sure we don't get all the gunk */
   #include <machine/endian.h>
   #undef _POSIX_SOURCE

Is it really that bad getting "all the gunk" from machine/endian.h, that
it warrants this kludge?

So what is the correct way of fixing soundcard.h? I prefere just removing
the #define, but I can live with the above construction too...