summaryrefslogtreecommitdiff
path: root/src/openbsd_pci.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2024-05-05 20:45:52 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2024-05-05 20:47:35 +0200
commit5ff043322ae4e5df25a1a9b6495c0f56d5168584 (patch)
tree7c50ce8ce465ea7f96c591f4b6f26df78568585e /src/openbsd_pci.c
parent3754a97778029ab7765910be8f8e867bab3dcae2 (diff)
Replace <sys/param.h>
Diffstat (limited to 'src/openbsd_pci.c')
-rw-r--r--src/openbsd_pci.c7
1 files changed, 5 insertions, 2 deletions
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 <sys/param.h>
#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/types.h>
#if defined(__i386__) || defined(__amd64__)
#include <sys/memrange.h>
#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)