mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 10:40:27 +09:00
Libssh-0.10.4 cannot be compiled anymore on CYGWIN
Commit 8cf9c816 "Do not force GNU_SOURCE during build to fix #141" has broken support for CYGWIN.
The build hangs with this error message:
libssh-0.10.4/src/config.c: In function ‘local_parse_glob’:
libssh-0.10.4/src/config.c:252:25: error: ‘GLOB_TILDE’ undeclared (first use in this function)
252 | rt = glob(fileglob, GLOB_TILDE, NULL, &globbuf);
| ^~~~~~~~~~
I think that it would be better to re-add it, by using target_compile_definitions() rather than target_compile_options(), which is more appropriate in my opinion.
Signed-off-by: Carlo Bramini carlo_bramini@users.sourceforge.net
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
76d375064b
commit
37deed27d6
@@ -348,6 +348,9 @@ endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND)
|
|||||||
# This gets built as a static library, if -DBUILD_SHARED_LIBS=OFF is passed to
|
# This gets built as a static library, if -DBUILD_SHARED_LIBS=OFF is passed to
|
||||||
# cmake.
|
# cmake.
|
||||||
add_library(ssh ${libssh_SRCS})
|
add_library(ssh ${libssh_SRCS})
|
||||||
|
if (CYGWIN)
|
||||||
|
target_compile_definitions(ssh PRIVATE _GNU_SOURCE)
|
||||||
|
endif ()
|
||||||
target_include_directories(ssh
|
target_include_directories(ssh
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${libssh_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${libssh_SOURCE_DIR}/include>
|
||||||
@@ -404,6 +407,9 @@ install(EXPORT libssh-config
|
|||||||
|
|
||||||
if (BUILD_STATIC_LIB)
|
if (BUILD_STATIC_LIB)
|
||||||
add_library(ssh-static STATIC ${libssh_SRCS})
|
add_library(ssh-static STATIC ${libssh_SRCS})
|
||||||
|
if (CYGWIN)
|
||||||
|
target_compile_definitions(ssh-static PRIVATE _GNU_SOURCE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_include_directories(ssh-static
|
target_include_directories(ssh-static
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
Reference in New Issue
Block a user