mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Define try_chdir everywhere
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -442,7 +442,7 @@ static void write_outcome_result(FILE *outcome_file,
|
||||
*
|
||||
* Failures are silent.
|
||||
*/
|
||||
static void try_chdir(const char *argv0)
|
||||
static void try_chdir_if_supported(const char *argv0)
|
||||
{
|
||||
/* We might want to allow backslash as well, for Windows. But then we also
|
||||
* need to consider chdir() vs _chdir(), and different conventions
|
||||
@ -467,6 +467,13 @@ static void try_chdir(const char *argv0)
|
||||
}
|
||||
mbedtls_free(path);
|
||||
}
|
||||
#else /* MBEDTLS_HAVE_CHDIR */
|
||||
/* No chdir() or no support for parsing argv[0] on this platform. */
|
||||
static void try_chdir_if_supported(const char *argv0)
|
||||
{
|
||||
(void) argv0;
|
||||
return;
|
||||
}
|
||||
#endif /* MBEDTLS_HAVE_CHDIR */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user