webkitgtk: fix gcc6 build
This commit is contained in:
parent
40f6a6ce07
commit
de10af227a
2 changed files with 27 additions and 1 deletions
26
srcpkgs/webkitgtk/patches/fix-ambigous_abs.patch
Normal file
26
srcpkgs/webkitgtk/patches/fix-ambigous_abs.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
Disambiguate abs() for gcc6 build.
|
||||
|
||||
--- Source/WebCore/platform/gtk/GtkClickCounter.cpp 2016-04-10 08:48:37.000000000 +0200
|
||||
+++ Source/WebCore/platform/gtk/GtkClickCounter.cpp 2016-09-12 23:01:44.285579470 +0200
|
||||
@@ -85,8 +85,8 @@
|
||||
guint32 eventTime = getEventTime(event);
|
||||
|
||||
if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
|
||||
- || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
|
||||
- && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
|
||||
+ || ((abs((int)(buttonEvent->x - m_previousClickPoint.x())) < doubleClickDistance)
|
||||
+ && (abs((int)(buttonEvent->y - m_previousClickPoint.y())) < doubleClickDistance)
|
||||
&& (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
|
||||
&& (buttonEvent->button == m_previousClickButton)))
|
||||
m_currentClickCount++;
|
||||
--- Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp 2016-04-10 08:48:37.000000000 +0200
|
||||
+++ Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp 2016-09-12 23:05:01.712760609 +0200
|
||||
@@ -659,7 +659,7 @@
|
||||
if (!std::isfinite(time))
|
||||
return String::fromUTF8(_("indefinite time"));
|
||||
|
||||
- int seconds = static_cast<int>(abs(time));
|
||||
+ int seconds = abs(static_cast<int>(time));
|
||||
int days = seconds / (60 * 60 * 24);
|
||||
int hours = seconds / (60 * 60);
|
||||
int minutes = (seconds / 60) % 60;
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'webkitgtk'
|
||||
pkgname=webkitgtk
|
||||
version=2.4.11
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-gtk-doc --disable-schemas-compile
|
||||
--enable-accelerated-compositing $(vopt_enable gir introspection)
|
||||
|
|
Loading…
Reference in a new issue