fix-ftbfs-gcc6.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Michael Catanzaro <mcatanzaro@igalia.com>
  2. Subject: Fix FTBFS with GCC 6
  3. Bug: https://bugs.webkit.org/show_bug.cgi?id=159124
  4. Bug-Debian: https://bugs.debian.org/828198
  5. Index: webkitgtk/Source/WebCore/platform/gtk/GtkClickCounter.cpp
  6. ===================================================================
  7. --- webkitgtk.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp
  8. +++ webkitgtk/Source/WebCore/platform/gtk/GtkClickCounter.cpp
  9. @@ -85,8 +85,8 @@ int GtkClickCounter::clickCountForGdkBut
  10. guint32 eventTime = getEventTime(event);
  11. if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
  12. - || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
  13. - && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
  14. + || ((fabs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
  15. + && (fabs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
  16. && (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
  17. && (buttonEvent->button == m_previousClickButton)))
  18. m_currentClickCount++;
  19. Index: webkitgtk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
  20. ===================================================================
  21. --- webkitgtk.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
  22. +++ webkitgtk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
  23. @@ -659,7 +659,7 @@ String localizedMediaTimeDescription(flo
  24. if (!std::isfinite(time))
  25. return String::fromUTF8(_("indefinite time"));
  26. - int seconds = static_cast<int>(abs(time));
  27. + int seconds = static_cast<int>(fabs(time));
  28. int days = seconds / (60 * 60 * 24);
  29. int hours = seconds / (60 * 60);
  30. int minutes = (seconds / 60) % 60;