add missing include to gui.cpp: <errno.h>