From 4967d0a22288ff58409ec86248396862ec5ae4f6 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Tue, 24 Jan 2023 10:46:00 +0100 Subject: [PATCH] Bluetooth: Build on unsupported platforms --- CMakeLists.txt | 5 +++++ src/detection/bluetooth/bluetooth_nosupport.c | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 src/detection/bluetooth/bluetooth_nosupport.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 67d7dc1c4..47543fab6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -357,6 +357,7 @@ elseif(ANDROID) src/common/processing_linux.c src/detection/battery/battery_android.c src/detection/bios/bios_nosupport.c + src/detection/bluetooth/bluetooth_nosupport.c src/detection/board/board_nosupport.c src/detection/brightness/brightness_nosupport.c src/detection/chassis/chassis_nosupport.c @@ -388,11 +389,13 @@ elseif(ANDROID) ) elseif(BSD) list(APPEND LIBFASTFETCH_SRC + src/common/dbus.c src/common/networking_linux.c src/common/processing_linux.c src/common/sysctl.c src/detection/battery/battery_bsd.c src/detection/bios/bios_bsd.c + src/detection/bluetooth/bluetooth_linux.c src/detection/board/board_nosupport.c src/detection/brightness/brightness_nosupport.c src/detection/chassis/chassis_nosupport.c @@ -435,6 +438,7 @@ elseif(APPLE) src/common/sysctl.c src/detection/battery/battery_apple.c src/detection/bios/bios_apple.c + src/detection/bluetooth/bluetooth_nosupport.c src/detection/board/board_nosupport.c src/detection/brightness/brightness_apple.c src/detection/chassis/chassis_nosupport.c @@ -473,6 +477,7 @@ elseif(WIN32) src/common/processing_windows.c src/detection/battery/battery_windows.c src/detection/bios/bios_windows.c + src/detection/bluetooth/bluetooth_nosupport.c src/detection/board/board_windows.c src/detection/brightness/brightness_windows.cpp src/detection/chassis/chassis_nosupport.c diff --git a/src/detection/bluetooth/bluetooth_nosupport.c b/src/detection/bluetooth/bluetooth_nosupport.c new file mode 100644 index 000000000..1bb524a02 --- /dev/null +++ b/src/detection/bluetooth/bluetooth_nosupport.c @@ -0,0 +1,6 @@ +#include "bluetooth.h" + +void ffDetectBluetoothImpl(const FFinstance* instance, FFBluetoothResult* bluetooth) +{ + ffStrbufAppendS(&bluetooth->error, "Bluetooth not supported on this platform"); +}