From 53f5469604b5295a93316ec75f5da6aaf299d892 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Tue, 11 Jun 2019 18:19:20 +1000 Subject: [PATCH] Fix app opt compile failure due to missing opt.c uses functions that are only available if inttypes.h exists. It now checks a define which is unavailable if inttypes.h is included. The include is done automagically inside e_os2.h. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/8986) --- apps/include/opt.h | 3 ++- apps/opt.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/include/opt.h b/apps/include/opt.h index ecfa06e0b4..81faf7057d 100644 --- a/apps/include/opt.h +++ b/apps/include/opt.h @@ -317,7 +317,8 @@ int opt_int(const char *arg, int *result); int opt_ulong(const char *arg, unsigned long *result); int opt_long(const char *arg, long *result); #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ - defined(INTMAX_MAX) && defined(UINTMAX_MAX) + defined(INTMAX_MAX) && defined(UINTMAX_MAX) && \ + !defined(OPENSSL_NO_INTTYPES_H) int opt_imax(const char *arg, intmax_t *result); int opt_umax(const char *arg, uintmax_t *result); #else diff --git a/apps/opt.c b/apps/opt.c index 439f271f53..f4a4e12581 100644 --- a/apps/opt.c +++ b/apps/opt.c @@ -377,7 +377,8 @@ int opt_long(const char *value, long *result) } #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ - defined(INTMAX_MAX) && defined(UINTMAX_MAX) + defined(INTMAX_MAX) && defined(UINTMAX_MAX) && \ + !defined(OPENSSL_NO_INTTYPES_H) /* Parse an intmax_t, put it into *result; return 0 on failure, else 1. */ int opt_imax(const char *value, intmax_t *result) -- 2.40.0