Skip to content

Handle variations in struct stat at compile time

Adriaan de Groot requested to merge work/adridg/improve-stat-variants into master

Rather than using Q_OS_* defines to determine what fields are available in struct stat and how to handle them, use C++ SFINAE to detect which fields there are and call accordingly. This will help systems like OpenBSD, which do have nanosecond-accuracy timestamps, but don't set them right now because they are not listed in the

This introduces a handful of SFINAE machinery that could possibly be used elsewhere, but I have not looked very hard.

Merge request reports