diff options
author | Xiang Xiao <xiaoxiang@xiaomi.com> | 2021-05-09 23:53:28 +0800 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2021-05-27 13:45:47 +0200 |
commit | d2182bb7af28894245fe877b4bef7340c8b0a009 (patch) | |
tree | bf8689cdfdbff9f762423b23439f5b81a7d3265c /include/libssh | |
parent | ae44d846b86d495e4e8d68a33bcc2532365e6ac5 (diff) | |
download | libssh-d2182bb7af28894245fe877b4bef7340c8b0a009.tar.gz libssh-d2182bb7af28894245fe877b4bef7340c8b0a009.tar.xz libssh-d2182bb7af28894245fe877b4bef7340c8b0a009.zip |
Replace the hardcode max path length with PATH_MAX
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: Icb1d36b48a759ec11dbaa4c09a39037a80ab0f85
Diffstat (limited to 'include/libssh')
-rw-r--r-- | include/libssh/priv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index b18ece4c..3e549b79 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -29,6 +29,7 @@ #ifndef _LIBSSH_PRIV_H #define _LIBSSH_PRIV_H +#include <limits.h> #include <stdint.h> #include <stdlib.h> #include <string.h> @@ -167,6 +168,10 @@ int gettimeofday(struct timeval *__p, void *__t); #include "libssh/callbacks.h" /* some constants */ +#ifndef PATH_MAX +# define PATH_MAX 4096 +#endif + #ifndef MAX_PACKET_LEN #define MAX_PACKET_LEN 262144 #endif |