From dd6a711354c8396c4b11b6641c0b208fbfb8e146 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 27 Feb 2025 11:41:44 +0100 Subject: [PATCH] Use windows-compatible access() function to unbreak windows build Fixes up 3372c2ad78af79dfb2fbdc667666f6096689660a which did not properly check the included header file. Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- src/options.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/options.c b/src/options.c index d17108f1..101d0f22 100644 --- a/src/options.c +++ b/src/options.c @@ -26,7 +26,6 @@ #include #include #include -#include #ifndef _WIN32 #include #else @@ -2724,7 +2723,7 @@ int ssh_bind_options_parse_config(ssh_bind sshbind, const char *filename) /* If the global default configuration hasn't been processed yet, process it * before the provided configuration. */ if (!(sshbind->config_processed)) { - if (access(GLOBAL_BIND_CONFIG, F_OK) == 0) { + if (ssh_file_readaccess_ok(GLOBAL_BIND_CONFIG)) { rc = ssh_bind_config_parse_file(sshbind, GLOBAL_BIND_CONFIG); #ifdef USR_GLOBAL_BIND_CONFIG } else {