From 78fc5a2b5d607e38e49230eae4addbcb38bc6625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 27 Sep 2024 00:00:04 +0800 Subject: [PATCH] GPU: fix compiling error when `-DCUSTOM_PCI_IDS_PATH` is used --- src/detection/gpu/gpu_pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detection/gpu/gpu_pci.c b/src/detection/gpu/gpu_pci.c index 5aa86a7b8..558a7722c 100644 --- a/src/detection/gpu/gpu_pci.c +++ b/src/detection/gpu/gpu_pci.c @@ -10,6 +10,9 @@ #include "fastfetch_pciids.c.inc" #endif +#define FF_STR_INDIR(x) #x +#define FF_STR(x) FF_STR_INDIR(x) + static const FFstrbuf* loadPciIds() { static FFstrbuf pciids; @@ -19,7 +22,7 @@ static const FFstrbuf* loadPciIds() #ifdef FF_CUSTOM_PCI_IDS_PATH - ffReadFileBuffer(FF_STR(FF_CUSTOM_PCI_IDS_PATH), pciids); + ffReadFileBuffer(FF_STR(FF_CUSTOM_PCI_IDS_PATH), &pciids); #else // FF_CUSTOM_PCI_IDS_PATH