--- tools/debugger/gdbsx/xg/xg_main.c
+++ tools/debugger/gdbsx/xg/xg_main.c
@@ -34,6 +34,7 @@
  *  XGTRC(): generic trace utility
  */

+#include <sys/types.h>
 #include <stdio.h>
 #include <stddef.h>
 #include <stdarg.h>
