From 65e604c40a065375575fb1355f36c59527188433 Mon Sep 17 00:00:00 2001 From: Divneil Rai Wadhawan Date: Thu, 26 Sep 2019 22:17:17 +0530 Subject: [PATCH 1/2] safestringlib: conditional inclusion of errno.h o While compiling for non-Linux based platforms where errno.h is not available, a new compile time flag is included. o Defining __LOCAL_ERRNO__ allows the safestring to compile without looking for errno.h Signed-off-by: Divneil Rai Wadhawan --- include/safe_lib_errno.h | 2 ++ include/safe_types.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/safe_lib_errno.h b/include/safe_lib_errno.h index 8f27111..b997099 100644 --- a/include/safe_lib_errno.h +++ b/include/safe_lib_errno.h @@ -36,7 +36,9 @@ #ifdef __KERNEL__ # include #else +#ifndef __LOCAL_ERRNO__ #include +#endif #endif /* __KERNEL__ */ /* diff --git a/include/safe_types.h b/include/safe_types.h index dba7474..a37d3f9 100644 --- a/include/safe_types.h +++ b/include/safe_types.h @@ -58,7 +58,9 @@ typedef int errno_t; #include #include +#ifndef __LOCAL_ERRNO__ #include +#endif typedef int errno_t; From 7eb63d1aeb7458604bf0cbbc040e122165901a1c Mon Sep 17 00:00:00 2001 From: Divneil Rai Wadhawan Date: Thu, 26 Sep 2019 23:47:10 +0530 Subject: [PATCH 2/2] safelib: strcasecmp_s: include header file for declaration of toupper() o toupper() suggests to include as the header file for its declaration. So, added the same. Signed-off-by: Divneil Rai Wadhawan --- safeclib/strcasecmp_s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/safeclib/strcasecmp_s.c b/safeclib/strcasecmp_s.c index 7293cef..99dafe7 100644 --- a/safeclib/strcasecmp_s.c +++ b/safeclib/strcasecmp_s.c @@ -32,7 +32,7 @@ #include "safeclib_private.h" #include "safe_str_constraint.h" #include "safe_str_lib.h" - +#include /** * NAME