perror() is an identifier reserved by ANSI/ISO C, and in case of a redefition the behavior is undefined.