From 5ff043322ae4e5df25a1a9b6495c0f56d5168584 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 5 May 2024 20:45:52 +0200 Subject: Replace --- src/openbsd_pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/openbsd_pci.c b/src/openbsd_pci.c index 30820a2..5582058 100644 --- a/src/openbsd_pci.c +++ b/src/openbsd_pci.c @@ -17,8 +17,9 @@ #include "config.h" #endif -#include #include +#include +#include #if defined(__i386__) || defined(__amd64__) #include #endif @@ -40,6 +41,8 @@ #include "pciaccess.h" #include "pciaccess_private.h" +#define MIN(a,b) (((a)<(b))?(a):(b)) + /* * This should allow for 16 domains, which should cover everything * except perhaps the really big fridge-sized sparc64 server machines @@ -619,7 +622,7 @@ pci_system_openbsd_create(void) { struct pci_device_private *device; int domain, bus, dev, func, ndevs, nfuncs; - char path[MAXPATHLEN]; + char path[PATH_MAX]; uint32_t reg; if (ndomains > 0) -- cgit v1.2.3