From: Jouni Malinen Date: Sat, 4 Apr 2015 08:52:03 +0000 (+0300) Subject: Fix compilation issues with CONFIG_NO_CONFIG_WRITE=y X-Git-Tag: hostap_2_5~867 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954f03aab2e058fbabed07c8390d0c236a216e08;p=thirdparty%2Fhostap.git Fix compilation issues with CONFIG_NO_CONFIG_WRITE=y Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index c69054222..fb539cc95 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -1296,6 +1296,7 @@ static int wpa_config_parse_eap(const struct parse_data *data, } +#ifndef NO_CONFIG_WRITE static char * wpa_config_write_eap(const struct parse_data *data, struct wpa_ssid *ssid) { @@ -1329,6 +1330,7 @@ static char * wpa_config_write_eap(const struct parse_data *data, return buf; } +#endif /* NO_CONFIG_WRITE */ static int wpa_config_parse_password(const struct parse_data *data, @@ -1411,6 +1413,7 @@ static int wpa_config_parse_password(const struct parse_data *data, } +#ifndef NO_CONFIG_WRITE static char * wpa_config_write_password(const struct parse_data *data, struct wpa_ssid *ssid) { @@ -1444,6 +1447,7 @@ static char * wpa_config_write_password(const struct parse_data *data, return buf; } +#endif /* NO_CONFIG_WRITE */ #endif /* IEEE8021X_EAPOL */ @@ -2517,6 +2521,9 @@ int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var, */ char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys) { +#ifdef NO_CONFIG_WRITE + return NULL; +#else /* NO_CONFIG_WRITE */ const struct parse_data *field; char *key, *value; size_t i; @@ -2562,6 +2569,7 @@ err: os_free(value++); os_free(props); return NULL; +#endif /* NO_CONFIG_WRITE */ }