wpa_supplicant: mark global variables defined in headers 'extern'

...to avoid defining common symbols.
GCC since version 10 defaults to -fno-common and doesn't generate
common symbols, leading to duplicate definitions of these symbols.
pull/6150/merge
Ivan Grokhotkov 2022-01-14 17:52:00 +01:00 zatwierdzone przez Anton Maklakov
rodzic 9720cb72cb
commit d4190a9471
5 zmienionych plików z 51 dodań i 38 usunięć

Wyświetl plik

@ -1,16 +1,8 @@
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_WPA_H__
#define __ESP_WPA_H__
@ -42,9 +34,10 @@ extern "C" {
* @{
*/
/* Crypto callback functions */
const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs; // NOLINT(readability-redundant-declaration)
/* Mesh crypto callback functions */
const mesh_crypto_funcs_t g_wifi_default_mesh_crypto_funcs;
extern const mesh_crypto_funcs_t g_wifi_default_mesh_crypto_funcs;
/**
* @brief Supplicant initialization

Wyświetl plik

@ -173,7 +173,7 @@ struct scan_info {
int nl_scan_event;
u64 scan_start_tsf;
u8 scan_start_tsf_bssid[ETH_ALEN];
} scan_info;
};
struct wpa_bss_trans_info {
u8 mbo_transition_reason;

Wyświetl plik

@ -42,6 +42,27 @@
#include "supplicant_opt.h"
u8 *g_wpa_anonymous_identity;
int g_wpa_anonymous_identity_len;
u8 *g_wpa_username;
int g_wpa_username_len;
const u8 *g_wpa_client_cert;
int g_wpa_client_cert_len;
const u8 *g_wpa_private_key;
int g_wpa_private_key_len;
const u8 *g_wpa_private_key_passwd;
int g_wpa_private_key_passwd_len;
const u8 *g_wpa_ca_cert;
int g_wpa_ca_cert_len;
u8 *g_wpa_password;
int g_wpa_password_len;
u8 *g_wpa_new_password;
int g_wpa_new_password_len;
char *g_wpa_ttls_phase2_type;
char *g_wpa_phase1_options;
u8 *g_wpa_pac_file;
int g_wpa_pac_file_len;
bool g_wpa_suiteb_certification;
void eap_peer_config_deinit(struct eap_sm *sm);
void eap_peer_blob_deinit(struct eap_sm *sm);

Wyświetl plik

@ -19,33 +19,33 @@ struct eap_method_type {
EapType method;
};
u8 *g_wpa_anonymous_identity;
int g_wpa_anonymous_identity_len;
u8 *g_wpa_username;
int g_wpa_username_len;
const u8 *g_wpa_client_cert;
int g_wpa_client_cert_len;
const u8 *g_wpa_private_key;
int g_wpa_private_key_len;
const u8 *g_wpa_private_key_passwd;
int g_wpa_private_key_passwd_len;
extern u8 *g_wpa_anonymous_identity;
extern int g_wpa_anonymous_identity_len;
extern u8 *g_wpa_username;
extern int g_wpa_username_len;
extern const u8 *g_wpa_client_cert;
extern int g_wpa_client_cert_len;
extern const u8 *g_wpa_private_key;
extern int g_wpa_private_key_len;
extern const u8 *g_wpa_private_key_passwd;
extern int g_wpa_private_key_passwd_len;
const u8 *g_wpa_ca_cert;
int g_wpa_ca_cert_len;
extern const u8 *g_wpa_ca_cert;
extern int g_wpa_ca_cert_len;
u8 *g_wpa_password;
int g_wpa_password_len;
extern u8 *g_wpa_password;
extern int g_wpa_password_len;
u8 *g_wpa_new_password;
int g_wpa_new_password_len;
extern u8 *g_wpa_new_password;
extern int g_wpa_new_password_len;
char *g_wpa_ttls_phase2_type;
char *g_wpa_phase1_options;
extern char *g_wpa_ttls_phase2_type;
extern char *g_wpa_phase1_options;
u8 *g_wpa_pac_file;
int g_wpa_pac_file_len;
extern u8 *g_wpa_pac_file;
extern int g_wpa_pac_file_len;
bool g_wpa_suiteb_certification;
extern bool g_wpa_suiteb_certification;
const u8 * eap_get_eapKeyData(struct eap_sm *sm, size_t *len);
void eap_deinit_prev_method(struct eap_sm *sm, const char *txt);

Wyświetl plik

@ -2120,7 +2120,6 @@ components/wifi_provisioning/src/wifi_provisioning_priv.h
components/wifi_provisioning/src/wifi_scan.c
components/wpa_supplicant/esp_supplicant/include/esp_dpp.h
components/wpa_supplicant/esp_supplicant/include/esp_rrm.h
components/wpa_supplicant/esp_supplicant/include/esp_wpa.h
components/wpa_supplicant/esp_supplicant/include/esp_wps.h
components/wpa_supplicant/esp_supplicant/src/esp_dpp_i.h
components/wpa_supplicant/esp_supplicant/src/esp_scan_i.h