summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-10-19 10:32:17 -0700
committerCy Schubert <cy@FreeBSD.org>2021-10-19 11:47:41 -0700
commitff67375036355e9cfb8b92b1d694cd936068c2cf (patch)
treebcbc7811e08a29a0c006f8d8876a1ead0bcdbdfc
parentnet/nats-server: Update to version 2.6.2 (diff)
audio/oss: Fix build on 14-CURRENT
As of dfff37765ce4ea4fd7db4d293b459dc84008f411 (1400010), struct device on 14-CURRENT was renamed to struct _device. This commit chases this change by adding a __FreeBSD_version CPP conditional. PR: 259275 Submitted by: cy Reported by: cy Reviewed by: crees Tested by: cy Approved by: crees MFH: 2021Q4 Differential Revision: https://reviews.freebsd.org/D32560
-rw-r--r--audio/oss/files/patch-kernel_OS_FreeBSD_wrapper_bsddefs.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/audio/oss/files/patch-kernel_OS_FreeBSD_wrapper_bsddefs.h b/audio/oss/files/patch-kernel_OS_FreeBSD_wrapper_bsddefs.h
index 9dfb8ff183fd..434fbd538dca 100644
--- a/audio/oss/files/patch-kernel_OS_FreeBSD_wrapper_bsddefs.h
+++ b/audio/oss/files/patch-kernel_OS_FreeBSD_wrapper_bsddefs.h
@@ -1,6 +1,18 @@
---- kernel/OS/FreeBSD/wrapper/bsddefs.h.orig 2019-03-06 07:52:21 UTC
-+++ kernel/OS/FreeBSD/wrapper/bsddefs.h
-@@ -93,8 +93,8 @@ extern void oss_udelay (unsigned long t);
+--- kernel/OS/FreeBSD/wrapper/bsddefs.h.orig 2021-10-19 08:38:32.843953000 -0700
++++ kernel/OS/FreeBSD/wrapper/bsddefs.h 2021-10-19 08:41:58.476795000 -0700
+@@ -32,7 +32,11 @@
+ #endif
+ extern int oss_get_uid (void);
+
++#if __FreeBSD_version > 1400009
++typedef struct _device dev_info_t;
++#else
+ typedef struct device dev_info_t;
++#endif
+ typedef long long oss_int64_t; /* Signed 64 bit integer */
+ typedef unsigned long long oss_uint64_t; /* Unsigned 64 bit integer */
+ typedef unsigned long offset_t;
+@@ -93,8 +97,8 @@
#ifdef _KERNEL
#ifdef memset
#undef memset