aboutsummaryrefslogtreecommitdiffstats
path: root/audio/oss
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2011-06-22 06:17:50 +0800
committerjkim <jkim@FreeBSD.org>2011-06-22 06:17:50 +0800
commit8f2068be027aa75967e706821f00c49ae7b0ebc4 (patch)
tree026a22116518f56b8fc619d7cfab6ff341085f9e /audio/oss
parentace821d11df384bb4cc7fd3f63366dedc2aab775 (diff)
downloadfreebsd-ports-gnome-8f2068be027aa75967e706821f00c49ae7b0ebc4.tar.gz
freebsd-ports-gnome-8f2068be027aa75967e706821f00c49ae7b0ebc4.tar.zst
freebsd-ports-gnome-8f2068be027aa75967e706821f00c49ae7b0ebc4.zip
Fix build with clang.
Diffstat (limited to 'audio/oss')
-rw-r--r--audio/oss/Makefile1
-rw-r--r--audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c11
-rw-r--r--audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c34
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-oss-build-module.inc11
-rw-r--r--audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c11
5 files changed, 68 insertions, 0 deletions
diff --git a/audio/oss/Makefile b/audio/oss/Makefile
index 42622bef36a8..7350f0f0b236 100644
--- a/audio/oss/Makefile
+++ b/audio/oss/Makefile
@@ -7,6 +7,7 @@
PORTNAME= oss
DISTVERSION= 4.2-build2004
+PORTREVISION= 1
CATEGORIES= audio kld
MASTER_SITES= http://www.opensound.com/developer/sources/stable/bsd/
DISTNAME= ${PORTNAME}-v${DISTVERSION}-src-bsd
diff --git a/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c b/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c
new file mode 100644
index 000000000000..13a3a42763da
--- /dev/null
+++ b/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c
@@ -0,0 +1,11 @@
+--- kernel/OS/FreeBSD/os_freebsd.c.orig 2011-01-05 16:06:40.000000000 -0500
++++ kernel/OS/FreeBSD/os_freebsd.c 2011-06-21 17:52:41.000000000 -0400
+@@ -315,7 +315,7 @@ oss_get_cardinfo (int cardnum, oss_card_
+
+ if (cards[cardnum]->name != NULL)
+ strncpy (ci->longname, cards[cardnum]->name, 128);
+- ci->shortname[127] = 0;
++ ci->longname[127] = 0;
+
+ if (cards[cardnum]->nick != NULL)
+ strncpy (ci->shortname, cards[cardnum]->nick, 16);
diff --git a/audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c b/audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c
new file mode 100644
index 000000000000..75c1c2c3be90
--- /dev/null
+++ b/audio/oss/files/patch-os_cmd-FreeBSD-ossdetect-ossdetect.c
@@ -0,0 +1,34 @@
+--- os_cmd/FreeBSD/ossdetect/ossdetect.c.orig 2011-01-05 16:06:39.000000000 -0500
++++ os_cmd/FreeBSD/ossdetect/ossdetect.c 2011-06-21 17:49:37.000000000 -0400
+@@ -376,17 +376,20 @@ pci_detect (void)
+ char name[32];
+
+ if (verbose > 2)
+- printf ("%s%d@pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
+- "chip=0x%08x rev=0x%02x hdr=0x%02x\n",
+- (p->pd_name && *p->pd_name) ? p->pd_name :
+- "none",
+- (p->pd_name && *p->pd_name) ? (int) p->pd_unit :
+- p->pc_sel.pc_bus, p->pc_sel.pc_dev,
+- p->pc_sel.pc_func, (p->pc_class << 16) |
+- (p->pc_subclass << 8) | p->pc_progif,
+- (p->pc_subdevice << 16) | p->pc_subvendor,
+- (p->pc_device << 16) | p->pc_vendor,
+- p->pc_revid, p->pc_hdr);
++ {
++ if (p->pd_name && *p->pd_name)
++ sprintf(name, "%s%d", p->pd_name, (int) p->pd_unit);
++ else
++ strcpy(name, "none");
++ printf ("%s@pci%d:%d:%d:\tclass=0x%06x card=0x%08x "
++ "chip=0x%08x rev=0x%02x hdr=0x%02x\n", name,
++ p->pc_sel.pc_bus, p->pc_sel.pc_dev, p->pc_sel.pc_func,
++ (p->pc_class << 16) |
++ (p->pc_subclass << 8) | p->pc_progif,
++ (p->pc_subdevice << 16) | p->pc_subvendor,
++ (p->pc_device << 16) | p->pc_vendor,
++ p->pc_revid, p->pc_hdr);
++ }
+
+ sprintf (name, "pcs%x,%x", p->pc_subvendor, p->pc_subdevice);
+ if (add_drv (name, PCI_PASS))
diff --git a/audio/oss/files/patch-setup-FreeBSD-oss-build-module.inc b/audio/oss/files/patch-setup-FreeBSD-oss-build-module.inc
new file mode 100644
index 000000000000..7f481428fbfa
--- /dev/null
+++ b/audio/oss/files/patch-setup-FreeBSD-oss-build-module.inc
@@ -0,0 +1,11 @@
+--- setup/FreeBSD/oss/build/module.inc.orig 2011-01-04 20:33:08.000000000 -0500
++++ setup/FreeBSD/oss/build/module.inc 2011-06-21 18:02:50.000000000 -0400
+@@ -53,7 +53,7 @@ cmn_err (int level, char *s, ...)
+ sprintf (tmp + strlen (tmp), s, a[0], a[1], a[2], a[3], a[4], a[5], NULL,
+ NULL, NULL, NULL);
+ if (level == CE_PANIC)
+- panic (tmp);
++ panic ("%s", tmp);
+ printf ("%s", tmp);
+ #if 0
+ /* This may cause a crash under SMP */
diff --git a/audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c b/audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c
new file mode 100644
index 000000000000..7ebf03ecd6a5
--- /dev/null
+++ b/audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c
@@ -0,0 +1,11 @@
+--- setup/FreeBSD/oss/build/osscore.c.orig 2011-01-04 20:33:08.000000000 -0500
++++ setup/FreeBSD/oss/build/osscore.c 2011-06-21 17:55:55.000000000 -0400
+@@ -75,7 +75,7 @@ cmn_err (int level, char *s, ...)
+ sprintf (tmp + strlen (tmp), s, a[0], a[1], a[2], a[3], a[4], a[5], NULL,
+ NULL, NULL, NULL);
+ if (level == CE_PANIC)
+- panic (tmp);
++ panic ("%s", tmp);
+ printf ("%s", tmp);
+ #if 0
+ /* This may cause a crash under SMP */