1#include <stdio.h> 2#include <errno.h> 3 4void perror(const char *msg) 5{ 6 printf("%s: error %s\n", msg, errno); 7} 8