From fb28d52e3bbfa61ae3a900d5a42972628c2e9ea2 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sat, 26 Aug 2023 10:55:24 +0200
Subject: 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 1c509ce8f7f6..46f7b982a7ec 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 arch/{arch}/include/asm/posix_types.h */
-- 
2.35.3

