mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-11 03:42:35 +03:00
Do not force GNU_SOURCE during build to fix #141
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
bd2db30174
commit
8cf9c8162f
@@ -348,10 +348,6 @@ 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})
|
||||||
target_compile_options(ssh
|
|
||||||
PRIVATE
|
|
||||||
${DEFAULT_C_COMPILE_FLAGS}
|
|
||||||
-D_GNU_SOURCE)
|
|
||||||
target_include_directories(ssh
|
target_include_directories(ssh
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${libssh_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${libssh_SOURCE_DIR}/include>
|
||||||
@@ -408,10 +404,6 @@ 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})
|
||||||
target_compile_options(ssh-static
|
|
||||||
PRIVATE
|
|
||||||
${DEFAULT_C_COMPILE_FLAGS}
|
|
||||||
-D_GNU_SOURCE)
|
|
||||||
|
|
||||||
target_include_directories(ssh-static
|
target_include_directories(ssh-static
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
@@ -1956,7 +1956,7 @@ char *ssh_strerror(int err_num, char *buf, size_t buflen)
|
|||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
strerror_s(buf, buflen, err_num);
|
strerror_s(buf, buflen, err_num);
|
||||||
return buf;
|
return buf;
|
||||||
#elif defined(__linux__) && defined(_GNU_SOURCE)
|
#elif defined(__linux__) && defined(__GLIBC__) && defined(_GNU_SOURCE)
|
||||||
/* GNU extension on Linux */
|
/* GNU extension on Linux */
|
||||||
return strerror_r(err_num, buf, buflen);
|
return strerror_r(err_num, buf, buflen);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -24,10 +24,6 @@
|
|||||||
#ifndef _TORTURE_H
|
#ifndef _TORTURE_H
|
||||||
#define _TORTURE_H
|
#define _TORTURE_H
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user