--- a/photosyst.c
+++ b/photosyst.c
@@ -152,6 +152,7 @@
static const char rcsid[] = "$Id: photosyst.c,v 1.38 2010/11/19 07:40:40 gerlof Exp $";
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>