Merge pull request #4631 from andreasbaumann/struct_stat_file_offset_bits fixed stack smashing due to wrong size of struct stat on the stack