<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>159124</bug_id>
          
          <creation_ts>2016-06-26 03:21:52 -0700</creation_ts>
          <short_desc>[GTK] 2.4.11 fails to build with gcc 6 and glibc 2.23</short_desc>
          <delta_ts>2018-05-08 20:26:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1205426</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2016-06-26 03:21:52 -0700</bug_when>
    <thetext>../Source/WebCore/platform/gtk/GtkClickCounter.cpp: In member function &apos;int WebCore::GtkClickCounter::clickCountForGdkButtonEvent(GtkWidget*, GdkEventButton*)&apos;:
../Source/WebCore/platform/gtk/GtkClickCounter.cpp:88:59: error: call of overloaded &apos;abs(gdouble)&apos; is ambiguous
         || ((abs(buttonEvent-&gt;x - m_previousClickPoint.x()) &lt; doubleClickDistance)
                                                           ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/stdlib.h:36,
                 from ../Source/WTF/wtf/FastMalloc.h:25,
                 from ../Source/JavaScriptCore/config.h:60,
                 from ../Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/stdlib.h:36:0,
                 from ../Source/WTF/wtf/FastMalloc.h:25,
                 from ../Source/JavaScriptCore/config.h:60,
                 from ../Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
../Source/WebCore/platform/gtk/GtkClickCounter.cpp:89:62: error: call of overloaded &apos;abs(gdouble)&apos; is ambiguous
             &amp;&amp; (abs(buttonEvent-&gt;y - m_previousClickPoint.y()) &lt; doubleClickDistance)
                                                              ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/stdlib.h:36,
                 from ../Source/WTF/wtf/FastMalloc.h:25,
                 from ../Source/JavaScriptCore/config.h:60,
                 from ../Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/stdlib.h:36:0,
                 from ../Source/WTF/wtf/FastMalloc.h:25,
                 from ../Source/JavaScriptCore/config.h:60,
                 from ../Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
GNUmakefile:51931: recipe for target &apos;Source/WebCore/platform/gtk/libPlatformGtk_la-GtkClickCounter.lo&apos; failed
make[2]: *** [Source/WebCore/platform/gtk/libPlatformGtk_la-GtkClickCounter.lo] Error 1
make[2]: *** Waiting for unfinished jobs....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205434</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-06-26 08:52:02 -0700</bug_when>
    <thetext>Fedora patch:

diff -Nur webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp webkitgtk-2.4.9/Source/WebCore/platform/gtk/GtkClickCounter.cpp
--- webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp	2015-05-20 03:03:24.000000000 -0600
+++ webkitgtk-2.4.9/Source/WebCore/platform/gtk/GtkClickCounter.cpp	2016-02-07 11:30:42.392686308 -0700
@@ -85,8 +85,8 @@
     guint32 eventTime = getEventTime(event);
 
     if ((event-&gt;type == GDK_2BUTTON_PRESS || event-&gt;type == GDK_3BUTTON_PRESS)
-        || ((abs(buttonEvent-&gt;x - m_previousClickPoint.x()) &lt; doubleClickDistance)
-            &amp;&amp; (abs(buttonEvent-&gt;y - m_previousClickPoint.y()) &lt; doubleClickDistance)
+        || ((fabs(buttonEvent-&gt;x - m_previousClickPoint.x()) &lt; doubleClickDistance)
+            &amp;&amp; (fabs(buttonEvent-&gt;y - m_previousClickPoint.y()) &lt; doubleClickDistance)
             &amp;&amp; (eventTime - m_previousClickTime &lt; static_cast&lt;guint&gt;(doubleClickTime))
             &amp;&amp; (buttonEvent-&gt;button == m_previousClickButton)))
         m_currentClickCount++;
diff -Nur webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp webkitgtk-2.4.9/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
--- webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2015-05-20 03:03:24.000000000 -0600
+++ webkitgtk-2.4.9/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2016-02-07 11:49:36.384691005 -0700
@@ -659,7 +659,7 @@
     if (!std::isfinite(time))
         return String::fromUTF8(_(&quot;indefinite time&quot;));
 
-    int seconds = static_cast&lt;int&gt;(abs(time));
+    int seconds = static_cast&lt;int&gt;(fabs(time));
     int days = seconds / (60 * 60 * 24);
     int hours = seconds / (60 * 60);
     int minutes = (seconds / 60) % 60;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205438</commentid>
    <comment_count>2</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2016-06-26 10:47:48 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Fedora patch:

It works fine, thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>