[PATCH 2/2] Fix build without CONFIG_NO_CONFIG_WRITE enabled.

Jouni Malinen j
Sat Mar 16 03:32:35 PDT 2013


On Mon, Mar 11, 2013 at 05:34:58PM -0400, Solomon Peachy wrote:
> +#ifndef NO_CONFIG_WRITE
>  static char * wpa_config_write_eap(const struct parse_data *data,
>  				   struct wpa_ssid *ssid)

NO_CONFIG_WRITE is not defined anywhere.. Was this supposed to be
CONFIG_NO_CONFIG_WRITE?

> +#ifndef NO_CONFIG_WRITE
>  /**
>   * wpa_config_get_all - Get all options from network configuration

Though, this would break a build that has CONFIG_NO_CONFIG_WRITE=y and
D-Bus interface enabled..

> diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
> +#ifndef CONFIG_NO_CONFIG_WRITE
>  	if (wpa_s->conf->update_config) {
>  		int ret = wpa_config_write(wpa_s->confname, wpa_s->conf);

While this can be used to reduce the binary size a bit, this is not
needed to fix the build as far as I can tell.

> @@ -798,8 +802,10 @@ int wpa_supplicant_init_eapol(struct wpa_supplicant *wpa_s)
> +#ifndef CONFIG_NO_CONFIG_BLOBS
>  	ctx->set_config_blob = wpa_supplicant_set_config_blob;
>  	ctx->get_config_blob = wpa_supplicant_get_config_blob;
> +#endif /* CONFIG_NO_CONFIG_BLOBS */

This is a valid fix for CONFIG_NO_CONFIG_BLOBS, but that does not match
with the commit log for this nor is this a complete solution (D-Bus code
was similar cases). I fixed the CONFIG_NO_CONFIG_BLOBS part in a
different commit that addresses all cases.

I did not apply the CONFIG_NO_CONFIG_WRITE parts because I cannot
reproduce build failure and the use of NO_CONFIG_BLOBS (vs.
CONFIG_NO_CONFIG_BLOBS) did not look correct.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list