[SLOF] [PATCH] libc: Declare size_t as unsigned long
Thomas Huth
thuth at redhat.com
Thu Jul 6 12:25:39 AEST 2017
If size_t is only "int", memset() and friends are limited
to 4 GB. And ssize_t is already declared as "long", so it
is somewhat inconsequent to define size_t as "int" only.
Signed-off-by: Thomas Huth <thuth at redhat.com>
---
lib/libc/include/stddef.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/libc/include/stddef.h b/lib/libc/include/stddef.h
index ba2d960..e240106 100644
--- a/lib/libc/include/stddef.h
+++ b/lib/libc/include/stddef.h
@@ -16,8 +16,7 @@
#define NULL ((void *)0)
-
-typedef unsigned int size_t;
+typedef unsigned long size_t;
#endif
--
1.8.3.1
More information about the SLOF
mailing list