nbdkit/0011-common-utils-utils.h-Add-C-boilerplate.patch
Richard W.M. Jones f06a5d96be Rebase to nbdkit 1.46.1
Backport nbdkit_name from nbdkit 1.47.
resolves: RHEL-111242
Test and document that VDDK 9.0.1.0 works
resolves: RHEL-140615
2026-01-20 12:26:38 +00:00

41 lines
1009 B
Diff

From b3502c4e9294ba5b760ca54312b1cc73eab1883d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 18 Jan 2026 18:33:38 +0000
Subject: [PATCH] common/utils/utils.h: Add C++ boilerplate
Allow these utility functions to be called from internal plugins
written in C++.
(cherry picked from commit 3db92f66452525309422329304f25f61fa807709)
---
common/utils/utils.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/common/utils/utils.h b/common/utils/utils.h
index 20cf0abc..3f9e4512 100644
--- a/common/utils/utils.h
+++ b/common/utils/utils.h
@@ -33,6 +33,10 @@
#ifndef NBDKIT_UTILS_H
#define NBDKIT_UTILS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
extern void shell_quote (const char *str, FILE *fp);
@@ -54,4 +58,8 @@ extern ssize_t full_pwrite (int fd, const void *buf, size_t count,
extern int64_t device_size (int fd, const struct stat *statbuf);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* NBDKIT_UTILS_H */
--
2.47.3