Hide the LOCAL_PEERCRED/SO_PEERCRED behind #ifdef linux.

Note that BSD defines LOCAL_PEERCRED but its interface appears to be different to the Linux one.
This commit is contained in:
Daniel O'Connor 2012-09-06 14:31:25 +09:30
parent 0562367b23
commit 5f0b70cf51

View File

@ -31,9 +31,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <ucred.h>
#endif
#ifdef linux
#if defined(LOCAL_PEERCRED) && !defined(SO_PEERCRED)
#define SO_PEERCRED LOCAL_PEERCRED
#endif
#endif
#define MONITOR_LINE_LENGTH 160
#define MONITOR_DATA_SIZE MAX_AUDIO_BYTES