configure/cmake: check for realpath

And make vtls_scache use HAVE_REALPATH

Fixes #16209
Reported-by: Andrew Kirillov
Closes #16225
This commit is contained in:
Daniel Stenberg 2025-02-06 22:35:09 +01:00
parent 1bf774df57
commit c0d38f547b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 9 additions and 2 deletions

View file

@ -433,6 +433,9 @@
/* If you have poll */
#cmakedefine HAVE_POLL 1
/* If you have realpath */
#cmakedefine HAVE_REALPATH 1
/* Define to 1 if you have the <poll.h> header file. */
#cmakedefine HAVE_POLL_H 1

View file

@ -359,7 +359,7 @@ static CURLcode cf_ssl_peer_key_add_path(struct dynbuf *buf,
char abspath[_MAX_PATH];
if(_fullpath(abspath, path, _MAX_PATH))
return Curl_dyn_addf(buf, ":%s-%s", name, abspath);
#else
#elif defined(HAVE_REALPATH)
if(path[0] != '/') {
char *abspath = realpath(path, NULL);
if(abspath) {