build: check properly for __stat64_time64
Having learned from prior LFS64 experience the glibc developers have
implemented stat in (albeit varying but) neater way:
- declaration with asm linkage to __stat64_time64
- or, `#define stat __stat64_time64`
- or, `#define stat stat64; #define stat64 __stat64_time64`
In all cases __stat64_time64 lacks an explicit declaration, unlike
open64, stat64, fopen64 mentioned earlier.
Since we lack declaration, we have no other option but to check if a
program with reference to __stat64_time64 can link, so we use the
check/has function.
For more details glibc commit
aa03f722f3 ("linux: Add {f}stat{at} y2038
support") added internal.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/131
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>