Skip to content

Commit

Permalink
Fix detection of sctp_sendmsg and sctp_recvmsg.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuexen committed Oct 7, 2016
1 parent bce2a2c commit ec5821d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ AC_TRY_COMPILE([#ifdef HAVE_SYS_TYPES_H
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])

AC_CHECK_LIB(sctp, sctp_sendmsg)
AC_CHECK_FUNCS(sctp_sendmsg,, [AC_CHECK_LIB(sctp, sctp_sendmsg)])
AC_CHECK_FUNCS(sctp_recvmsg,, [AC_CHECK_LIB(sctp, sctp_sendmsg)])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
6 changes: 3 additions & 3 deletions guile-sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ _scm_from_sockaddr (const struct sockaddr *address, unsigned addr_size, const ch
}


#ifdef HAVE_LIBSCTP

#ifdef HAVE_SCTP_RECVMSG
SCM_DEFINE (net_sctp_recvmsg, "sctp-recvmsg!", 2, 3, 0,
(SCM sock, SCM str, SCM flags, SCM start, SCM end),
"Return data from the socket port @var{sock} and also\n"
Expand Down Expand Up @@ -329,7 +328,9 @@ SCM_DEFINE (net_sctp_recvmsg, "sctp-recvmsg!", 2, 3, 0,
return scm_list_4 (scm_from_int (rv), address, scm_from_int (flg), s_sinfo);
}
#undef FUNC_NAME
#endif

#ifdef HAVE_SCTP_SENDMSG
SCM_DEFINE (net_sctp_sendmsg, "sctp-sendmsg", 8, 0, 1,
(SCM sock, SCM message, SCM ppid, SCM stream_no, SCM ttl, SCM context, SCM fam_or_sockaddr, SCM address, SCM args_and_flags),
"Transmit the string @var{message} on the socket port\n"
Expand Down Expand Up @@ -404,7 +405,6 @@ SCM_DEFINE (net_sctp_sendmsg, "sctp-sendmsg", 8, 0, 1,
return scm_from_int (rv);
}
#undef FUNC_NAME

#endif


Expand Down

0 comments on commit ec5821d

Please sign in to comment.