From 2cd64c748a5aff0460aad9b73c528257f74ae1aa Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 19 Jul 2019 14:46:50 -0700 Subject: [PATCH] Only require XATOI for build-cases that need it. --- wolfssl/wolfcrypt/types.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 0dabd946e..6e96dd27c 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -401,9 +401,6 @@ #define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n)) #define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n)) - #include - #define XATOI(s) atoi((s)) - #ifdef USE_WOLF_STRSEP #define XSTRSEP(s1,d) wc_strsep((s1),(d)) #else @@ -483,6 +480,14 @@ #define XSTRTOK(s1,d,ptr) strtok_r((s1),(d),(ptr)) #endif #endif + + #if defined(WOLFSSL_CERT_EXT) || defined(HAVE_OCSP) || \ + defined(HAVE_CRL_IO) || defined(HAVE_HTTP_CLIENT) || \ + !defined(NO_CRYPT_BENCHMARK) + + #include + #define XATOI(s) atoi((s)) + #endif #endif #ifdef USE_WOLF_STRTOK