anonymous structs can't have extern linkage in modern C++.

fixes clang
This commit is contained in:
espie 2017-05-04 19:45:27 +00:00
parent 7a71be4f06
commit e1f191a618
2 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-geo_drgeo_dialog_cc,v 1.1 2017/05/04 19:45:27 espie Exp $
Modern C++ doesn't want to give external linkage to anonymous structs
Index: geo/drgeo_dialog.cc
--- geo/drgeo_dialog.cc.orig
+++ geo/drgeo_dialog.cc
@@ -38,7 +38,7 @@ static GtkWidget *drgeoEditDialog = NULL, *drgeoEntry;
// Used in the style dialod callback, I know it's ugly, but so easy
static drgeoFigure *selected_figure;
-struct
+struct fooclang
{
drgeoPoint mouse;
drgeoFigure *figure;

View File

@ -1,7 +1,18 @@
$OpenBSD: patch-geo_drgeo_figure_cc,v 1.1 2005/11/11 20:23:53 wilfried Exp $
--- geo/drgeo_figure.cc.orig Sun Nov 6 12:07:33 2005
+++ geo/drgeo_figure.cc Sun Nov 6 12:11:08 2005
@@ -1044,7 +1044,7 @@ drgeoFigure::getKeyFromValueOnHash (gpoi
$OpenBSD: patch-geo_drgeo_figure_cc,v 1.2 2017/05/04 19:45:27 espie Exp $
Index: geo/drgeo_figure.cc
--- geo/drgeo_figure.cc.orig
+++ geo/drgeo_figure.cc
@@ -48,7 +48,7 @@
#include "drgeo_dialog.h"
#include "traite.h"
-extern struct
+extern struct fooclang
{
drgeoPoint mouse;
drgeoFigure *figure;
@@ -1044,7 +1044,7 @@ drgeoFigure::getKeyFromValueOnHash (gpointer value)
return NULL;
else
// data.key is a * gchar get it content as a gpointer