From 0fb1f314092233b6dc03e4dd3ce42e8c7b1f6304 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 8 Jun 2025 16:58:09 +0200 Subject: [PATCH] Allow pci.h to be included from C++ --- lib/pci.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/pci.h b/lib/pci.h index 71dae3a..58fd5b4 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -1,7 +1,7 @@ /* * The PCI Library * - * Copyright (c) 1997--2024 Martin Mares + * Copyright (c) 1997--2025 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL v2+ * @@ -11,6 +11,10 @@ #ifndef _PCI_LIB_H #define _PCI_LIB_H +#ifdef __cplusplus +extern "C" { +#endif + #ifndef PCI_CONFIG_H #include "config.h" #endif @@ -313,4 +317,8 @@ enum pci_lookup_mode { PCI_LOOKUP_NO_HWDB = 0x800000, /* Do not ask udev's hwdb */ }; +#ifdef __cplusplus +} +#endif + #endif -- 2.47.3