From 913f6e8f6c1da632f310d5a7f9d103589202b244 Mon Sep 17 00:00:00 2001 From: IhorNehrutsa Date: Tue, 30 Jan 2024 15:31:36 +0200 Subject: [PATCH] esp32/hashlib: Fix HASHLIB dependencies. Signed-off-by: IhorNehrutsa --- extmod/modhashlib.c | 0 ports/esp32/mpconfigport.h | 3 +++ py/mpconfig.h | 2 ++ 3 files changed, 5 insertions(+) mode change 100644 => 100755 extmod/modhashlib.c diff --git a/extmod/modhashlib.c b/extmod/modhashlib.c old mode 100644 new mode 100755 diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index 5dc4a9c758..1ff4e072af 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -101,9 +101,12 @@ #define MICROPY_BLUETOOTH_NIMBLE (1) #define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1) #endif +#define MICROPY_PY_HASHLIB (1) +#if MICROPY_PY_HASHLIB #define MICROPY_PY_HASHLIB_MD5 (1) #define MICROPY_PY_HASHLIB_SHA1 (1) #define MICROPY_PY_HASHLIB_SHA256 (1) +#endif #define MICROPY_PY_CRYPTOLIB (1) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (esp_random()) #define MICROPY_PY_OS_INCLUDEFILE "ports/esp32/modos.c" diff --git a/py/mpconfig.h b/py/mpconfig.h index 9a1f04568e..869ab798d0 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1645,6 +1645,7 @@ typedef double mp_float_t; #define MICROPY_PY_HASHLIB (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES) #endif +#if MICROPY_PY_HASHLIB #ifndef MICROPY_PY_HASHLIB_MD5 #define MICROPY_PY_HASHLIB_MD5 (0) #endif @@ -1656,6 +1657,7 @@ typedef double mp_float_t; #ifndef MICROPY_PY_HASHLIB_SHA256 #define MICROPY_PY_HASHLIB_SHA256 (1) #endif +#endif #ifndef MICROPY_PY_CRYPTOLIB #define MICROPY_PY_CRYPTOLIB (0)