mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
openldap: fix -Wtentative-definition-compat
It's a `-Weverything` warning that appeared in llvm/clang 21.
```
lib/openldap.c:1297:19: warning: duplicate declaration of 'ldapsb_tls' is invalid in C++ [-Wtentative-definition-compat]
1297 | static Sockbuf_IO ldapsb_tls =
| ^
lib/openldap.c:499:19: note: previous declaration is here
499 | static Sockbuf_IO ldapsb_tls;
| ^
```
Reported-by: correctmost on github
Fixes #18470
Cherry-picked from #18477
Closes #18485
This commit is contained in:
@@ -496,7 +496,24 @@ static CURLcode oldap_perform_sasl(struct Curl_easy *data)
|
||||
}
|
||||
|
||||
#ifdef USE_SSL
|
||||
static Sockbuf_IO ldapsb_tls;
|
||||
static int ldapsb_tls_setup(Sockbuf_IO_Desc *sbiod, void *arg);
|
||||
static int ldapsb_tls_remove(Sockbuf_IO_Desc *sbiod);
|
||||
static int ldapsb_tls_ctrl(Sockbuf_IO_Desc *sbiod, int opt, void *arg);
|
||||
static ber_slen_t ldapsb_tls_read(Sockbuf_IO_Desc *sbiod, void *buf,
|
||||
ber_len_t len);
|
||||
static ber_slen_t ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf,
|
||||
ber_len_t len);
|
||||
static int ldapsb_tls_close(Sockbuf_IO_Desc *sbiod);
|
||||
|
||||
static Sockbuf_IO ldapsb_tls =
|
||||
{
|
||||
ldapsb_tls_setup,
|
||||
ldapsb_tls_remove,
|
||||
ldapsb_tls_ctrl,
|
||||
ldapsb_tls_read,
|
||||
ldapsb_tls_write,
|
||||
ldapsb_tls_close
|
||||
};
|
||||
|
||||
static bool ssl_installed(struct connectdata *conn)
|
||||
{
|
||||
@@ -1293,16 +1310,6 @@ ldapsb_tls_write(Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Sockbuf_IO ldapsb_tls =
|
||||
{
|
||||
ldapsb_tls_setup,
|
||||
ldapsb_tls_remove,
|
||||
ldapsb_tls_ctrl,
|
||||
ldapsb_tls_read,
|
||||
ldapsb_tls_write,
|
||||
ldapsb_tls_close
|
||||
};
|
||||
#endif /* USE_SSL */
|
||||
|
||||
#endif /* !CURL_DISABLE_LDAP && USE_OPENLDAP */
|
||||
|
||||
Reference in New Issue
Block a user