Skip to content

Commit c85dc05

Browse files
carlo-braminiJakuje
authored andcommitted
CYGWIN: fix build.
Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net> Reviewed-by: Jakub Jelen <jjelen@redhat.com> (cherry picked from commit e2986003039e1fb7f2762e4dbc5902dce0358f4a)
1 parent 8d0d3d4 commit c85dc05

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ char *ssh_strreplace(const char *src, const char *pattern, const char *replace)
19711971
*/
19721972
char *ssh_strerror(int err_num, char *buf, size_t buflen)
19731973
{
1974-
#if defined(__linux__) && defined(__GLIBC__) && defined(_GNU_SOURCE)
1974+
#if ((defined(__linux__) && defined(__GLIBC__)) || defined(__CYGWIN__)) && defined(_GNU_SOURCE)
19751975
/* GNU extension on Linux */
19761976
return strerror_r(err_num, buf, buflen);
19771977
#else
@@ -1989,7 +1989,7 @@ char *ssh_strerror(int err_num, char *buf, size_t buflen)
19891989
buf[0] = '\0';
19901990
}
19911991
return buf;
1992-
#endif /* defined(__linux__) && defined(__GLIBC__) && defined(_GNU_SOURCE) */
1992+
#endif /* ((defined(__linux__) && defined(__GLIBC__)) || defined(__CYGWIN__)) && defined(_GNU_SOURCE) */
19931993
}
19941994

19951995
/**

src/ttyopts.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ encode_termios_opts(struct termios *attr, unsigned char *buf, size_t buflen)
264264
SSH_ENCODE_LOCAL_OPT(IEXTEN)
265265
SSH_ENCODE_LOCAL_OPT(ECHOCTL)
266266
SSH_ENCODE_LOCAL_OPT(ECHOKE)
267+
#ifdef PENDIN
267268
SSH_ENCODE_LOCAL_OPT(PENDIN)
269+
#endif
268270
#undef SSH_ENCODE_LOCAL_OPT
269271

270272
#define SSH_ENCODE_CC_OPT(opt) SSH_ENCODE_OPT(TTY_OP_##opt, attr->c_cc[opt])

0 commit comments

Comments
 (0)