In JavaScriptCore/wtf/Platform.h the detection for availability of timegm() is as follows: #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \ && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \ && !OS(ANDROID) && !PLATFORM(BREWMP) #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 #define HAVE_TIMEGM 1 #endif However, under linux with LSB compilers, there is no timegm() either. Therefore, an additional !defined(__LSB_VERSION__) needs to be added to the #if condition.
Sorry, not quite right. The corrected version of the code should be this: #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \ && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \ && !OS(ANDROID) && !PLATFORM(BREWMP) #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 #if !defined(__LSB_VERSION__) #define HAVE_TIMEGM 1 #endif #endif The LSB spec *does* have tm_gmtoff and tm_zone in the tm data structure since LSB 1.2, which basically all linux distributions would adhere to by now.
Can you provide a patch for this? See http://webkit.org/coding/contributing.html
It would be beneficial to understand the extent of changes required to build webkit with LSB compilers. Is this the only change required ? Reference to the Qt bug - https://bugreports.qt-project.org/browse/QTBUG-16336?focusedCommentId=136479&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel. Reference to LSB - http://www.linuxbase.org/navigator/browse/int_single.php?cmd=list-by-name&Ilibrary=libc&Iname=timegm
There were three LSB-related bugs that I filed around the same time. These arose from building the webkit part within Qt. I do not work on webkit directly as it stands outside of the Qt code base. I've also since changed companies, so I can't commit time to these issues currently. For reference, the other two LSB-related bugs were bug 51974 and bug 51972. None of the three bugs should require more than the trivial changes mentioned in each bug report.
FWIW, if you want to know what breaks when building webkit with LSB compilers, just download the LSB SDK and use the lsbcc and lsbc++ compilers instead of gcc and g++ respectively. The compilers will soon tell you if something breaks. ;)