mirror of
https://github.com/curl/curl.git
synced 2025-03-01 15:15:34 +08:00
libssh: Improve fix for missing SSH_S_ stat macros
- If building libcurl against an old libssh version missing SSH_S_IFMT
and SSH_S_IFLNK then use the values from a supported version.
Prior to this change if libssh did not define SSH_S_IFMT and SSH_S_IFLNK
then S_IFMT and S_IFLNK, respectively, were used instead. The problem
with that is the user's S_ stat macros don't have the same values across
platforms. For example Windows has values different from Linux.
Follow-up to 7b0fd39
.
Ref: https://github.com/curl/curl/pull/8511#discussion_r815292391
Ref: https://github.com/curl/curl/pull/8574
Closes https://github.com/curl/curl/pull/8588
This commit is contained in:
parent
8b42d7b9d4
commit
9d55fb4675
@ -105,11 +105,12 @@
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
/* These stat values may not be the same as the user's S_IFMT / S_IFLNK */
|
||||
#ifndef SSH_S_IFMT
|
||||
#define SSH_S_IFMT S_IFMT
|
||||
#define SSH_S_IFMT 00170000
|
||||
#endif
|
||||
#ifndef SSH_S_IFLNK
|
||||
#define SSH_S_IFLNK S_IFLNK
|
||||
#define SSH_S_IFLNK 0120000
|
||||
#endif
|
||||
|
||||
/* Local functions: */
|
||||
|
Loading…
Reference in New Issue
Block a user