Fix build problems on AIX

fixes #9531
This commit is contained in:
Gunnar Beutner 2015-07-01 08:48:42 +02:00
parent 3f622858e6
commit 93177ee09a
2 changed files with 5 additions and 3 deletions

View File

@ -142,8 +142,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif() endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data") if(NOT CMAKE_SYSTEM_NAME MATCHES AIX)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data")
endif()
endif() endif()
if(ICINGA2_LTO_BUILD) if(ICINGA2_LTO_BUILD)

View File

@ -146,7 +146,7 @@ int dumb_socketpair(int socks[2], int dummy)
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
dummy = socketpair(AF_LOCAL, SOCK_STREAM, 0, socks); dummy = socketpair(AF_UNIX, SOCK_STREAM, 0, socks);
if (dummy) if (dummy)
socks[0] = socks[1] = -1; socks[0] = socks[1] = -1;
return dummy; return dummy;