#include "toys.h" int xsocket(int domain, int type, int protocol) { int fd = socket(domain, type, protocol); if (fd < 0) perror_exit("socket %x %x", type, protocol); return fd; }