fix warnings about unused variables
use gnu variant of strerror_r