Changeset 51:08d8cbeff30b in freeDiameter
- Timestamp:
- Nov 27, 2009, 5:19:45 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/sctp.c
r47 r51 735 735 /* Try connecting */ 736 736 TRACE_DEBUG(FULL, "Attempting SCTP connection (%d addresses attempted)...", count); 737 #ifdef SCTP_CONNECTX_4_ARGS 737 738 CHECK_SYS_DO( sctp_connectx(*sock, sar.sa, count, NULL), { ret = errno; goto fail; } ); 739 #else /* SCTP_CONNECTX_4_ARGS */ 740 CHECK_SYS_DO( sctp_connectx(*sock, sar.sa, count), { ret = errno; goto fail; } ); 741 #endif /* SCTP_CONNECTX_4_ARGS */ 738 742 free(sar.buf); sar.buf = NULL; 739 743 -
include/freeDiameter/CMakeLists.txt
r24 r51 27 27 INCLUDE (CheckIncludeFiles) 28 28 INCLUDE (CheckSymbolExists) 29 INCLUDE (CheckCSourceCompiles) 29 30 INCLUDE (TestBigEndian) 30 31 … … 53 54 SET(FD_LIBS ${FD_LIBS} ${CLOCK_GETTIME_LIBS}) 54 55 55 # We need the sctp_ getladdrs function ( -lsctp )56 # We need the sctp_connectx function among others 56 57 # We need the IPPROTO_SCTP symbol from sys/socket.h, netinet/in.h or netinet/sctp.h 57 58 IF(NOT DISABLE_SCTP) 58 CHECK_FUNCTION_EXISTS(sctp_ getladdrsHAVE_NATIVE_SCTP)59 CHECK_FUNCTION_EXISTS(sctp_connectx HAVE_NATIVE_SCTP) 59 60 IF(NOT HAVE_NATIVE_SCTP) 60 61 FIND_PACKAGE(SCTP REQUIRED) … … 62 63 SET(FD_LIBS ${FD_LIBS} ${SCTP_LIBRARIES}) 63 64 ENDIF(NOT HAVE_NATIVE_SCTP) 65 # Now check the number of args of this function, since it changed between Ubuntu 9.04 and 9.10 66 SET(CHECK_SCTP_CONNECTX_4_ARGS_SOURCE_CODE " 67 #include <netinet/sctp.h>; 68 int main() { 69 return sctp_connectx(0, NULL, 0, NULL); 70 } 71 ") 72 SET(CMAKE_REQUIRED_LIBRARIES ${SCTP_LIBRARIES}) 73 CHECK_C_SOURCE_COMPILES("${CHECK_SCTP_CONNECTX_4_ARGS_SOURCE_CODE}" SCTP_CONNECTX_4_ARGS) 64 74 ENDIF(NOT DISABLE_SCTP) 65 75 -
include/freeDiameter/freeDiameter-host.h.in
r24 r51 47 47 #cmakedefine DEBUG_SCTP 48 48 #cmakedefine SCTP_USE_MAPPED_ADDRESSES 49 #cmakedefine SCTP_CONNECTX_4_ARGS 50 49 51 #cmakedefine ERRORS_ON_TODO 50 52 #cmakedefine DEBUG
Note: See TracChangeset
for help on using the changeset viewer.