mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
BUG 96: Guard ntohll() and htonll prototypes correctly.
This commit is contained in:
@@ -138,6 +138,7 @@ if (UNIX)
|
|||||||
check_function_exists(select HAVE_SELECT)
|
check_function_exists(select HAVE_SELECT)
|
||||||
check_function_exists(cfmakeraw HAVE_CFMAKERAW)
|
check_function_exists(cfmakeraw HAVE_CFMAKERAW)
|
||||||
check_function_exists(ntohll HAVE_NTOHLL)
|
check_function_exists(ntohll HAVE_NTOHLL)
|
||||||
|
check_function_exists(htonll HAVE_HTONLL)
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
|
|
||||||
set(LIBSSH_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "libssh required system libraries")
|
set(LIBSSH_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "libssh required system libraries")
|
||||||
|
@@ -97,6 +97,9 @@
|
|||||||
/* Define to 1 if you have the `ntohll' function. */
|
/* Define to 1 if you have the `ntohll' function. */
|
||||||
#cmakedefine HAVE_NTOHLL 1
|
#cmakedefine HAVE_NTOHLL 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `htonll' function. */
|
||||||
|
#cmakedefine HAVE_HTONLL 1
|
||||||
|
|
||||||
/*************************** LIBRARIES ***************************/
|
/*************************** LIBRARIES ***************************/
|
||||||
|
|
||||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||||
|
@@ -34,9 +34,14 @@ int ssh_analyze_banner(ssh_session session, int server, int *ssh1, int *ssh2);
|
|||||||
int ssh_is_ipaddr_v4(const char *str);
|
int ssh_is_ipaddr_v4(const char *str);
|
||||||
int ssh_is_ipaddr(const char *str);
|
int ssh_is_ipaddr(const char *str);
|
||||||
|
|
||||||
|
#ifndef HAVE_NTOHLL
|
||||||
/* macro for byte ordering */
|
/* macro for byte ordering */
|
||||||
uint64_t ntohll(uint64_t);
|
uint64_t ntohll(uint64_t);
|
||||||
#define htonll(x) ntohll(x)
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_HTONLL
|
||||||
|
#define htonll(x) ntohll((x))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* list processing */
|
/* list processing */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user