wxwidgets: add patch: fix build with GCC >= 6.x

This commit is contained in:
Boris Pek 2016-05-05 19:11:39 +03:00
parent 0bcfdad559
commit 6869e3b13b
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
From: Boris Pek <tehnick-8@mail.ru>
Date: Thu, 05 May 2016 19:11:19 +0300
Subject: [PATCH] fix build with GCC >= 6.x
diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
--- a/src/stc/scintilla/src/Editor.cxx
+++ b/src/stc/scintilla/src/Editor.cxx
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
+#include <math.h>
#include <string>
#include <vector>
@@ -5841,9 +5842,9 @@
}
static bool Close(Point pt1, Point pt2) {
- if (abs(pt1.x - pt2.x) > 3)
+ if (fabs(pt1.x - pt2.x) > 3)
return false;
- if (abs(pt1.y - pt2.y) > 3)
+ if (fabs(pt1.y - pt2.y) > 3)
return false;
return true;
}