change lseek64() to lseek() and off64_t to off_t. Cygwin doesn't have those functions/types. They should be 64-bit if  _FILE_OFFSET_BITS == 64 is set