]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jit: Ensure ssize_t is defined
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 11 May 2024 15:08:05 +0000 (17:08 +0200)
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 18 Sep 2024 16:00:38 +0000 (18:00 +0200)
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.

gcc/jit/ChangeLog:

* libgccjit.h: Include <sys/types.h>

gcc/jit/libgccjit.h

index 1d5be27374ec1daaf659f225e90289bd0c3760b1..03bfc0f58a533847e11d0c3e20a95b1e91a4ed11 100644 (file)
@@ -21,6 +21,11 @@ along with GCC; see the file COPYING3.  If not see
 #define LIBGCCJIT_H
 
 #include <stdio.h>
+#ifdef __has_include
+#if __has_include (<sys/types.h>)
+#include <sys/types.h>
+#endif
+#endif
 
 #ifdef __cplusplus
 extern "C" {