From 18b6a76a4299e1bb946efc2ce401fc09827e1271 Mon Sep 17 00:00:00 2001
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Date: Sat, 11 May 2024 17:08:05 +0200
Subject: [PATCH] jit: Ensure ssize_t is defined

On some targets it seems that ssize_t is not defined by any of the
headers transitively included by <stdio.h>.  This leads to a bootstrap
fail when jit is enabled.

Other code in GCC treats <sys/types.h> as available on all targets,
so let's include it unconditionaly.

gcc/jit/ChangeLog:

	* libgccjit.h: Include <sys/types.h>
---
 gcc/jit/libgccjit.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
index 74e847b2dec..cbe0f70abee 100644
--- a/gcc/jit/libgccjit.h
+++ b/gcc/jit/libgccjit.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.  If not see
 #define LIBGCCJIT_H
 
 #include <stdio.h>
+#include <sys/types.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.39.3 (Apple Git-146)

