FreeBSD and NetBSD have st_birthtime in struct stat, so we can easily get creation time of files without manually setting xattr. There is existing code for PLATFORM(COCOA), and we can just reuse it. FreeBSD xattr API is incompatible with Linux xattr API, so GLib doesn't support it. st_birthtime works on both UFS2 and tmpfs. NetBSD xattr has a compatible interface with Linux xattr, but it is only supported on old filesystem such as UFS1. st_birthtime works on both UFS2 and tmpfs.
Created attachment 253099 [details] Patch
Comment on attachment 253099 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253099&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:80 > -#if PLATFORM(COCOA) > +#if PLATFORM(COCOA) || (USE(SOUP) && (OS(DARWIN) || OS(FREEBSD) || OS(NETBSD))) Maybe we could simplify this by defining a macro for this in WTF/wtf/Platform.h, something like HAVE_STAT_BIRTHTIME or something similar.
Created attachment 253272 [details] Patch
Comment on attachment 253272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253272&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:80 > -#if PLATFORM(COCOA) > +#if PLATFORM(COCOA) || (USE(SOUP) && HAVE(STAT_BIRTHTIME)) I think we could use just #if HAVE(STAT_BIRTHTIME)
Comment on attachment 253272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253272&action=review >> Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:80 >> +#if PLATFORM(COCOA) || (USE(SOUP) && HAVE(STAT_BIRTHTIME)) > > I think we could use just #if HAVE(STAT_BIRTHTIME) Yes, that’s right.
Created attachment 253384 [details] Patch
Comment on attachment 253384 [details] Patch Thanks!
Comment on attachment 253384 [details] Patch Clearing flags on attachment: 253384 Committed r184567: <http://trac.webkit.org/changeset/184567>
All reviewed patches have been landed. Closing bug.