mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-06-11 12:56:21 +09:00
options: Enable ssh_options_getopt on all platforms
Include the new platform-independent getopt wrapper header and remove the #ifdef _MSC_VER guard that disabled ssh_options_getopt() on MSVC. The function is now compiled unconditionally on all platforms. Signed-off-by: Mingyuan Li <2560359315@qq.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "libssh/options.h"
|
||||
#include "libssh/config_parser.h"
|
||||
#include "libssh/gssapi.h"
|
||||
#include "libssh/getopt.h"
|
||||
#include "libssh/token.h"
|
||||
#ifdef WITH_SERVER
|
||||
#include "libssh/server.h"
|
||||
@@ -1838,13 +1839,6 @@ int ssh_options_get(ssh_session session, enum ssh_options_e type, char** value)
|
||||
*/
|
||||
int ssh_options_getopt(ssh_session session, int *argcptr, char **argv)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
(void)session;
|
||||
(void)argcptr;
|
||||
(void)argv;
|
||||
/* Not supported with a Microsoft compiler */
|
||||
return -1;
|
||||
#else
|
||||
char *user = NULL;
|
||||
char *cipher = NULL;
|
||||
char *identity = NULL;
|
||||
@@ -2008,7 +2002,6 @@ int ssh_options_getopt(ssh_session session, int *argcptr, char **argv)
|
||||
}
|
||||
|
||||
return SSH_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user