Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16336

Detection of timegm availability fails in webkit sources

    XMLWordPrintable

Details

    • Bug
    • Resolution: Moved
    • Not Evaluated
    • None
    • 4.7.1
    • Build System
    • None
    • Linux using LSB 4.0 compilers

    Description

      The following file has problems when building Qt's webkit module from source with LSB compilers:

      3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp

      Specifically, the compiler complains that timegm() is not availble:

      ../3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp: In function 'int32_t QTWTF::calculateUTCOffset()':
      ../3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp:408: error: 'timegm' was not declared in this scope

      Looking at the DateMath.cpp source, this line of code should not have been compiled, since it is immediately preceded by a test for timegm availability:

      #if HAVE(TIMEGM)
      time_t utcOffset = timegm(&localt) - mktime(&localt);
      #else
      // Using a canned date of 01/01/2009 on platforms with weaker date-handling foo.
      localt.tm_year = 109;
      time_t utcOffset = 1230768000 - mktime(&localt);
      #endif

      It would seem that Qt's configure step is not recognising that timegm() is not available with the linux-lsb-g++ mkspec and/or this is not being passed through to the webkit part of the build.

      Note also that the man page for timegm() describes an alternative for timegm() implemented in terms of the LSB-compliant mktime() function, so the webkit source could probably be cleaned up to make use of this as a more robust solution to the problem.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            buddenha Oswald Buddenhagen
            jirauser11888 user-aa151 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes