summaryrefslogtreecommitdiff
path: root/games/plib/patches/patch-aa
blob: 28ee6c921c422f0cea71ad238fa3c41928b751c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-aa,v 1.4 2006/03/28 23:05:05 joerg Exp $

--- src/sl/slPortability.h.orig	Mon Sep 22 06:08:29 2003
+++ src/sl/slPortability.h	Mon Sep 22 06:09:02 2003
@@ -35,7 +35,8 @@
 
 /* the next lines are to define BSD */
 /* see http://www.freebsd.org/handbook/porting.html for why we do this */
-#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)) \
+    && !defined(USG)
 #include <sys/param.h>
 #endif
 
@@ -70,15 +71,17 @@
 #include <limits.h>
 #include <math.h>
 
-#if (defined(__linux__) || defined(BSD)) && !defined(__NetBSD__)
+#if (defined(__linux__) || defined(BSD) || defined(__DragonFly__)) && !defined(__NetBSD__)
 #define SL_USING_OSS_AUDIO 1
 #endif
 
 #ifdef SL_USING_OSS_AUDIO
 #  if defined(__linux__)
 #    include <linux/soundcard.h>
-#  elif defined(__FreeBSD__)
-#    include <machine/soundcard.h>
+#  elif (defined(__FreeBSD__) && __FreeBSD_version >= 500000) || defined(__DragonFly__)
+#    include <sys/soundcard.h>
+#  elif (defined(__FreeBSD__) && __FreeBSD_version < 500000)
+#    include <machine/soundcard.h>
 #  else
     /*
       Tom thinks this file may be <sys/soundcard.h> under some