From 9832a0e45b356f040f0430689025dd1f611fba19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 26 Jun 2025 21:32:46 +0800 Subject: [PATCH] GPU (FreeBSD): fix compiling when libdrm is not available Fix #1820 --- src/detection/gpu/gpu_bsd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/detection/gpu/gpu_bsd.c b/src/detection/gpu/gpu_bsd.c index 20556b66f..3d4605546 100644 --- a/src/detection/gpu/gpu_bsd.c +++ b/src/detection/gpu/gpu_bsd.c @@ -212,11 +212,13 @@ static const char* detectByPci(const FFGPUOptions* options, FFlist* gpus) const char* ffDetectGPUImpl(const FFGPUOptions* options, FFlist* gpus) { + #if FF_HAVE_DRM if (options->detectionMethod == FF_GPU_DETECTION_METHOD_AUTO) { detectByDrm(options, gpus); if (gpus->length > 0) return NULL; } + #endif return detectByPci(options, gpus); }