On some systems (namely Debian buster armhf) the readdir() call fails with `Value too large for defined data type` unless the _FILE_OFFSET_BITS=64 is defined. The correct way to fix this is to get the appropriate compilation parameters from getconf system interface.