[webkit-gtk] Compilation failure: ‘struct stat’ has no member named ‘st_birthtime’

Alberto Garcia berto at igalia.com
Mon Mar 9 04:16:33 PDT 2020

On Fri, Mar 06, 2020 at 01:58:41AM +0600, Pavel Nikulin wrote:
> In function ‘WebKit::NetworkCache::FileTimes
> WebKit::NetworkCache::fileTimes(const WTF::String&)’:
> /var/tmp/portage/net-libs/webkit-gtk-2.26.4/work/webkitgtk-2.26.4/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp:123:48:
> error: ‘struct stat’ has no member named ‘st_birthtime’
>   123 |     return { WallTime::fromRawSeconds(fileInfo.st_birthtime),
> WallTime::fromRawSeconds(fileInfo.st_mtime) };
>       |                                                ^~~~~~~~~~~~

st_birthtime is a BSD-specific extension to the stat structure.

Somehow CMake detects that st_birthtime is present in sys/stat.h but
then the compilation fails because that field cannot be found.

So my guess is that the check in CMake is not working correctly.

WEBKIT_CHECK_HAVE_STRUCT(HAVE_STAT_BIRTHTIME "struct stat" st_birthtime sys/stat.h)

Can you tell us the version of the operating system, C++ compiler, C
library and CMake that you are using to build WebKitGTK?


More information about the webkit-gtk mailing list