mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +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) */
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user