--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -21,6 +21,8 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <sys/types.h>
+
 #if !defined (INFERIOR_H)
 #define INFERIOR_H 1