1
--- a/include/soundcard.h
2
+++ b/include/soundcard.h
4
/* In Linux we need to be prepared for cross compiling */
5
#include <linux/ioctl.h>
8
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
9
# include <sys/ioccom.h>
11
# include <sys/ioctl.h>
12
--- a/kernel/framework/audio/oss_audio_core.c
13
+++ b/kernel/framework/audio/oss_audio_core.c
19
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
20
case FREEBSD_GETBLKSIZE:
22
case SNDCTL_DSP_GETBLKSIZE:
23
--- a/kernel/framework/sndstat/oss_sndstat.c
24
+++ b/kernel/framework/sndstat/oss_sndstat.c
29
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
30
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__)
32
-#if defined(__FreeBSD__)
33
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
34
extern char version[];
37
--- a/lib/libOSSlib/compile.sh
38
+++ b/lib/libOSSlib/compile.sh
44
+"FreeBSD" | "GNU/kFreeBSD")
51
#include "srcconf_linux.inc"
55
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
56
#include "srcconf_freebsd.inc"
60
#include "gen_driver_linux.inc"
63
-#if defined(__FreeBSD__)
64
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
65
#include "gen_driver_freebsd.inc"
69
strcpy (un.sysname, "SCO_SV");
70
if (strcmp (un.sysname, "Haiku") == 0)
71
strcpy (un.sysname, "BeOS");
72
+ if (strcmp (un.sysname, "GNU/kFreeBSD") == 0)
73
+ strcpy (un.sysname, "FreeBSD");
74
printf ("System: %s\n", un.sysname);
75
strcpy (conf->system, un.sysname);
76
sprintf (this_os, "kernel/OS/%s", un.sysname);
78
if (hostcc == NULL) hostcc = DEFAULT_CC;
79
if (targetcc == NULL) targetcc = DEFAULT_CC;
81
-#if defined(linux) || defined(__FreeBSD__) || defined(__SCO_VERSION__)
82
+#if defined(linux) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__SCO_VERSION__)
83
mkdir ("target", 0755);
84
mkdir ("target/build", 0755);
85
system ("touch target/build/.nomake");
86
--- a/setup/setupdir.sh
87
+++ b/setup/setupdir.sh
92
+# Use the same source directories for FreeBSD and GNU/kFreeBSD
93
+if test "$OS " = "GNU/kFreeBSD "
98
# Use Linux24 as the OS name for Linux 2.4.x
99
if test "$OS " = "Linux "
101
--- a/setup/FreeBSD/build.sh
102
+++ b/setup/FreeBSD/build.sh
103
@@ -150,10 +150,10 @@
104
strip prototype/usr/sbin/osslic
106
BITS=3 # Default to 32 bit ELF format
107
- if test "`uname -m` " = "amd64 "
109
+ case "`uname -m`" in amd64|x86_64)
110
BITS=6 # Use 64 bit ELF format
115
prototype/usr/sbin/osslic -q -u -$BITS./prototype/$OSSLIBDIR/build/osscore.lib