Mailing List Archive

[master] 43c8e8dd4 Declare anonymous structs in VSC header files
commit 43c8e8dd443ebd3cf9c556c873a91f57fe864736
Author: Martin Blix Grydeland <martin@varnish-software.com>
Date: Fri Sep 17 17:05:43 2021 +0200

Declare anonymous structs in VSC header files

Declare anonymous vsmw_cluster and vsc_seg structs in VSC header
files. This is to silence errors when the header file is used in other
contexts that don't know about these structs.

diff --git a/lib/libvsc/vsctool.py b/lib/libvsc/vsctool.py
index c9254b090..db2a396dc 100755
--- a/lib/libvsc/vsctool.py
+++ b/lib/libvsc/vsctool.py
@@ -195,6 +195,10 @@ class CounterSet(object):
fo.write("#define VSC_" + self.name +
"_size PRNDUP(sizeof(" + self.struct + "))\n\n")

+ fo.write("struct vsmw_cluster;\n");
+ fo.write("struct vsc_seg;\n");
+ fo.write("\n");
+
fo.write(self.struct + " *VSC_" + self.name + "_New")
fo.write("(struct vsmw_cluster *,\n")
fo.write(" struct vsc_seg **, const char *fmt, ...);\n")
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit