From 77b2b2306f23a773c4d9fdf1afc169b8add0faf2 Mon Sep 17 00:00:00 2001 From: David Kozub Date: Thu, 3 Oct 2019 21:23:17 +0200 Subject: [PATCH] extras/wificfg: make the default wifi options overridable wificfg.c defines the default values for ssid, password and hostname. But because these are not weak, trying to redefine these causes a link error. This change marks the definitions in wificfg.c weak, thus making it possible for a program using the wificfg component to redefine these w/o having to touch wificfg.c. --- extras/wificfg/wificfg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extras/wificfg/wificfg.c b/extras/wificfg/wificfg.c index fe04e9f..5a5c9c9 100644 --- a/extras/wificfg/wificfg.c +++ b/extras/wificfg/wificfg.c @@ -54,9 +54,9 @@ #endif -const char *wificfg_default_ssid = "EOR_%02X%02X%02X"; -const char *wificfg_default_password = "esp-open-rtos"; -const char *wificfg_default_hostname = "eor-%02x%02x%02x"; +const char *wificfg_default_ssid __attribute__ ((weak)) = "EOR_%02X%02X%02X"; +const char *wificfg_default_password __attribute__ ((weak)) = "esp-open-rtos"; +const char *wificfg_default_hostname __attribute__ ((weak)) = "eor-%02x%02x%02x"; /* The http task stack allocates a single buffer to do much of it's work. */ #define HTTP_BUFFER_SIZE 54