]> granicus.if.org Git - graphviz/commitdiff
gvpack: mark 'gvplugin_neato_layout_LTX_library' as having C linkage
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 15 Apr 2022 00:28:00 +0000 (17:28 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 25 Apr 2022 02:12:48 +0000 (19:12 -0700)
gvpack.c is currently compiled as C, so this symbol already has C linkage by
default. However an upcoming commit converts it to C++, which then results in
link failures due to this defaulting to C++ linkage. To pre-empt that, we note
its linkage explicitly for now. These guards will be removed in a future commit.

Gitlab: #2154

cmd/tools/gvpack.c

index 0fad73b36a71f893d48a2d1abf1728149c1acb71..7caf6d75ee41573f7e99376e0129f049e35f8dda 100644 (file)
 #include <stddef.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifdef GVDLL
   __declspec(dllimport)
 #endif
 extern gvplugin_library_t gvplugin_neato_layout_LTX_library;
 
+#ifdef __cplusplus
+}
+#endif
+
 lt_symlist_t lt_preloaded_symbols[] = {
 #ifdef GVDLL
        { "gvplugin_neato_layout_LTX_library", 0 },