diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-09-30 17:38:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-04 10:54:03 +0200 |
commit | 13c7a12af0ab73adb5577adfd3d28731cd1b6190 (patch) | |
tree | d5b20f5aa305a100affc80bf62eaa49c5817b018 /include | |
parent | dce140e7d1bbe1105f2745cc51c229c41d3360be (diff) | |
download | barebox-13c7a12af0ab73adb5577adfd3d28731cd1b6190.tar.gz barebox-13c7a12af0ab73adb5577adfd3d28731cd1b6190.tar.xz |
include: define SSIZE_MAX in <linux/limits.h>
For symmetry with SIZE_MAX, which we already define, define SIZE_MAX as
well. Definition taken from Linux.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220930153819.744833-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/limits.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/limits.h b/include/linux/limits.h index e1aa2de845..eab3848bbf 100644 --- a/include/linux/limits.h +++ b/include/linux/limits.h @@ -19,6 +19,7 @@ #define SIZE_MAX (~(size_t)0) #define PHYS_ADDR_MAX (~(phys_addr_t)0) #define UINTPTR_MAX ULONG_MAX +#define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1)) #define U8_MAX ((u8)~0U) #define S8_MAX ((s8)(U8_MAX >> 1)) |