mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
CYGWIN: fix build.
Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit e298600303)
This commit is contained in:
committed by
Jakub Jelen
parent
8d0d3d4d7b
commit
c85dc05436
@@ -1971,7 +1971,7 @@ char *ssh_strreplace(const char *src, const char *pattern, const char *replace)
|
||||
*/
|
||||
char *ssh_strerror(int err_num, char *buf, size_t buflen)
|
||||
{
|
||||
#if defined(__linux__) && defined(__GLIBC__) && defined(_GNU_SOURCE)
|
||||
#if ((defined(__linux__) && defined(__GLIBC__)) || defined(__CYGWIN__)) && defined(_GNU_SOURCE)
|
||||
/* GNU extension on Linux */
|
||||
return strerror_r(err_num, buf, buflen);
|
||||
#else
|
||||
@@ -1989,7 +1989,7 @@ char *ssh_strerror(int err_num, char *buf, size_t buflen)
|
||||
buf[0] = '\0';
|
||||
}
|
||||
return buf;
|
||||
#endif /* defined(__linux__) && defined(__GLIBC__) && defined(_GNU_SOURCE) */
|
||||
#endif /* ((defined(__linux__) && defined(__GLIBC__)) || defined(__CYGWIN__)) && defined(_GNU_SOURCE) */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -264,7 +264,9 @@ encode_termios_opts(struct termios *attr, unsigned char *buf, size_t buflen)
|
||||
SSH_ENCODE_LOCAL_OPT(IEXTEN)
|
||||
SSH_ENCODE_LOCAL_OPT(ECHOCTL)
|
||||
SSH_ENCODE_LOCAL_OPT(ECHOKE)
|
||||
#ifdef PENDIN
|
||||
SSH_ENCODE_LOCAL_OPT(PENDIN)
|
||||
#endif
|
||||
#undef SSH_ENCODE_LOCAL_OPT
|
||||
|
||||
#define SSH_ENCODE_CC_OPT(opt) SSH_ENCODE_OPT(TTY_OP_##opt, attr->c_cc[opt])
|
||||
|
||||
Reference in New Issue
Block a user