Attempt to auto-detect stat(1) being used if not given proper invocation

GNU stat(1) uses '-c "%s"' as the proper invocation to print filesize of the
file in question, while BSD stat(1) uses '-f "%Uz"'. Do some trivial
autodetection to check if we're using GNU stat(1) and assume we're using BSD
stat(1) if we don't detect otherwise.

This should allow the test suite to run properly out-of-the-box on *BSDs and
MacOS in addition to the current Linux support.

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
1 file changed