From c42a6edb4818f370d5495a274998110ea5bb0bc1 Mon Sep 17 00:00:00 2001 From: Alexander Usyskin Date: Mon, 24 Mar 2025 11:38:21 +0200 Subject: [PATCH] safestringlib: avoid redefining RSIZE_MAX Do not redefine RSIZE_MAX when it is defined in system includes. Fixes: https://github.com/intel/safestringlib/issues/78 Signed-off-by: Alexander Usyskin --- include/safe_lib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/safe_lib.h b/include/safe_lib.h index 39189d3..dae884d 100644 --- a/include/safe_lib.h +++ b/include/safe_lib.h @@ -39,8 +39,10 @@ typedef size_t rsize_t; */ /* #define RSIZE_MAX (~(rsize_t)0) - leave here for completeness */ +#ifndef RSIZE_MAX /* Bring back the standard */ #define RSIZE_MAX ( 256UL << 20 ) /* 256MB */ +#endif /* RSIZE_MAX */ typedef void (*constraint_handler_t) (const char * /* msg */, void * /* ptr */,