From ac64aa0c60c5c1431d274099aea2b05416a0a56e Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Thu, 23 May 2024 11:32:56 +0200 Subject: [PATCH] fix(linux): Miscellaneous fixes for linux build on MacOS This commit fixes some compilation errors for the linux build on MacOS. --- components/efuse/linux/esp_efuse_utility.c | 2 +- components/log/src/linux/log_timestamp.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/efuse/linux/esp_efuse_utility.c b/components/efuse/linux/esp_efuse_utility.c index de62292242..25c69d0cad 100644 --- a/components/efuse/linux/esp_efuse_utility.c +++ b/components/efuse/linux/esp_efuse_utility.c @@ -89,7 +89,7 @@ esp_err_t esp_efuse_utility_burn_chip_opt(bool ignore_coding_errors, bool verify // This function reads EFUSE_BLKx_WDATAx_REG registers, and checks possible to write these data with RS coding scheme. // The RS coding scheme does not require data changes for the encoded data. esp32s2 has special registers for this. // They will be filled during the burn operation. -esp_err_t esp_efuse_utility_apply_new_coding_scheme() +esp_err_t esp_efuse_utility_apply_new_coding_scheme(void) { // start with EFUSE_BLK1. EFUSE_BLK0 - always uses EFUSE_CODING_SCHEME_NONE. for (int num_block = EFUSE_BLK1; num_block < EFUSE_BLK_MAX; num_block++) { diff --git a/components/log/src/linux/log_timestamp.c b/components/log/src/linux/log_timestamp.c index 04fc51d433..f341c0e5a2 100644 --- a/components/log/src/linux/log_timestamp.c +++ b/components/log/src/linux/log_timestamp.c @@ -17,4 +17,8 @@ uint32_t esp_log_early_timestamp(void) return milliseconds; } -uint32_t esp_log_timestamp(void) __attribute__((alias("esp_log_early_timestamp"))); +// Avoid using __attribute(alias) here since linux target builds on MacOS fail to compile. +uint32_t esp_log_timestamp(void) +{ + return esp_log_early_timestamp(); +}