Not sure why greg_t got changed from 'long' to 'long long' in newer versions of glibc; just cast it to be compatible