Re: git: 9cab9fde5eda - main - virtual_oss: Port to base

From: Peter Jeremy <peterj_at_freebsd.org>
Date: Mon, 29 Sep 2025 22:22:46 UTC
On 2025-Sep-29 21:11:53 +0200, Christos Margiolis <christos@freebsd.org> wrote:
>On Mon Sep 29, 2025 at 11:58 AM CEST, Peter Jeremy wrote:
>> On 2025-Sep-28 09:58:53 +0000, Christos Margiolis <christos@FreeBSD.org> wrote:
>>>The branch main has been updated by christos:
>>>
>>>URL: https://cgit.FreeBSD.org/src/commit/?id=9cab9fde5edad9b409dd2317a2aec7815e6d6bed
>>>
>>>commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed
>>>Author:     Christos Margiolis <christos@FreeBSD.org>
>>>AuthorDate: 2025-09-28 09:56:52 +0000
>>>Commit:     Christos Margiolis <christos@FreeBSD.org>
>>>CommitDate: 2025-09-28 09:56:52 +0000
>>>
>>>    virtual_oss: Port to base
>>
>> This fails to compile if "WITHOUT_BLUETOOTH=yes" is specified (see below)
>> because bluetooth.h isn't available (as expected).  It looks like
>> virtual_oss isn't taking that option into account when working out what
>> to compile.
...
>
>I haven't had time to test yet, but I will try tomorrow. Does the build
>work if you build virtual_bt_speaker(8) conditionally in the Makefile
>(i.e., usr.sbin/virtual_oss/Makefile)?

The following patch builds as expected both with and without
WITHOUT_BLUETOOTH=yes

diff --git a/usr.sbin/virtual_oss/Makefile b/usr.sbin/virtual_oss/Makefile
index bf73041377b3..0fc611832795 100644
--- a/usr.sbin/virtual_oss/Makefile
+++ b/usr.sbin/virtual_oss/Makefile
@@ -1,8 +1,9 @@
 .include <src.opts.mk>
 
-SUBDIR+= virtual_bt_speaker \
-	 virtual_oss_cmd \
+SUBDIR+= virtual_oss_cmd \
 	 virtual_oss
 
+SUBDIR.${MK_BLUETOOTH}+= virtual_bt_speaker 
+
 .include "Makefile.inc"
 .include <bsd.subdir.mk>

-- 
Peter Jeremy