Skip to content

Instantly share code, notes, and snippets.

@aerosol
Created August 11, 2011 12:56
Show Gist options
  • Select an option

  • Save aerosol/1139572 to your computer and use it in GitHub Desktop.

Select an option

Save aerosol/1139572 to your computer and use it in GitHub Desktop.
erlang R14B03 patch - makes SCTP work on OSX
--- inet_drv.c.orig 2011-08-11 14:46:15.000000000 +0200
+++ inet_drv.c 2011-08-11 14:48:13.000000000 +0200
@@ -3453,9 +3453,11 @@
/* Check the size of SCTP AssocID -- currently both this driver and the
Erlang part require 32 bit: */
ASSERT(sizeof(sctp_assoc_t)==ASSOC_ID_LEN);
-# ifndef LIBSCTP
-# error LIBSCTP not defined
-# endif
+/*# ifndef LIBSCTP*/
+/*# error LIBSCTP not defined*/
+/*# endif*/
+ inet_init_sctp();
+ add_driver_entry(&sctp_inet_driver_entry);
if (erts_sys_ddll_open_noext(STRINGIFY(LIBSCTP), &h_libsctp, NULL) == 0) {
void *ptr;
if (erts_sys_ddll_sym(h_libsctp, "sctp_bindx", &ptr) == 0) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment