On Wed, Dec 05, 2018 at 05:47:45PM +0100, Peter Krempa wrote:
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/Makefile.am | 1 +
src/libvirt_private.syms | 1 +
src/util/Makefile.inc.am | 1 +
src/util/virerror.c | 5 ++++-
src/util/virerrorpriv.h | 28 ++++++++++++++++++++++++++++
5 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 src/util/virerrorpriv.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 33ff280d78..0bb3ff8fc8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -951,6 +951,7 @@ libvirt_nss_la_SOURCES = \
util/vircommand.h \
util/virerror.c \
util/virerror.h \
+ util/virerrorpriv.h \
Unrelated to the commit message and compiles fine without it.
util/virfile.c \
util/virfile.h \
util/virhash.c \
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index fd63c9ca61..6184030d59 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1752,6 +1752,7 @@ ebtablesRemoveForwardAllowIn;
virDispatchError;
virErrorCopyNew;
virErrorInitialize;
+virErrorMsg;
virErrorPreserveLast;
virErrorRestore;
virErrorSetErrnoFromLastError;
diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am
index cffbb357bc..4295babac3 100644
--- a/src/util/Makefile.inc.am
+++ b/src/util/Makefile.inc.am
@@ -50,6 +50,7 @@ UTIL_SOURCES = \
util/virendian.h \
util/virerror.c \
util/virerror.h \
+ util/virerrorpriv.h \
util/virevent.c \
util/virevent.h \
util/vireventpoll.c \
diff --git a/src/util/virerror.c b/src/util/virerror.c
index 64be00dc75..be23712a60 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -31,6 +31,9 @@
#include "virutil.h"
#include "virstring.h"
+#define __VIR_ERROR_ALLOW_INCLUDE_PRIV_H__
+#include "virerrorpriv.h"
From consistency POV, you also want:
#undefine
__VIR_ERROR_ALLOW_INCLUDE_PRIV_H__
With the proposed adjustments:
Reviewed-by: Erik Skultety <eskultet(a)redhat.com>