diff --git a/src/common/callerid.h b/src/common/callerid.h
index 84b550f8598bddd6adc3bf42bc5bc1ce9e2c41ad..86e707c883ff52c03e71dfaa06b48c82d0c01de9 100644
--- a/src/common/callerid.h
+++ b/src/common/callerid.h
@@ -38,9 +38,9 @@
 #define _SLURM_CALLERID_H
 
 #include <arpa/inet.h>
+#include <sys/types.h>
 
 #ifdef __FreeBSD__
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #endif