From a9fb88b72aca3f9d139957c2bbfe39a484a825a8 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 26 Aug 2023 10:55:24 +0200
Subject: [PATCH 258/463] Fix intptr_t typedef

GCC includes the same typedef, but on some 32bit platforms it's defined
as int, leading to conflicts.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 include/linux/types.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/types.h b/include/linux/types.h
index 2bc8766ba20ca..246d8b89d76ac 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -40,7 +40,11 @@ typedef __kernel_uid16_t        uid16_t;
 typedef __kernel_gid16_t        gid16_t;
 
 typedef unsigned long		uintptr_t;
+#if __SIZEOF_POINTER__ == __SIZEOF_INT__
+typedef int			intptr_t;
+#else
 typedef long			intptr_t;
+#endif
 
 #ifdef CONFIG_HAVE_UID16
 /* This is defined by include/asm-{arch}/posix_types.h */
-- 
2.46.0

