[erlang-questions] Patch to fix crypto and SCTP support on FreeBSD

Jean-Sébastien Pédron jspedron@REDACTED
Sat Jul 7 01:39:58 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

To build with SCTP support on FreeBSD, I had to make two fixes:

    1. There's no libsctp. The patch had a check to erts/configure.in
       for libsctp; erts/emulator/Makefile.in is also updated to add
       -lsctp only when it's available.

    2. `struct sctp_event_subscribe.sctp_adaptation_layer_event' doesn't
       use the previous spelling (`adaptation' in FreeBSD vs. `adaption'
       in Linux). A check is added to erts/configure.in for the
       structure member and erts/emulator/drivers/common/inet_drv.c is
       updated accordingly.

The fix isn't FreeBSD-specific but I didn't tested it on other *BSD.
Note that this only fix the build. I didn't ran any real testcases
because I don't have one.

The second point of the patch concerns the crypto application. By
default, the link of the port driver is done with ld(1) but Erlang can't
load it. If the link is made with gcc(1), it works again. The patch
updates erts/configure.in to set DED_LD to `gcc' on FreeBSD too.

This fix is FreeBSD-specific. Other *BSD may need it as well.

After applying the patch, you must run autoconf(1) and autoheader(1) in
erts/.

A simpler patch is already committed to the FreeBSD ports collection in
`erlang-r11b5_1,1'.

Best regards,

- --
Jean-Sébastien Pédron
http://www.dumbbell.fr/

PGP Key: http://www.dumbbell.fr/pgp/pubkey.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjtLOa+xGJsFYOlMRAi3VAJ40qLapzhpEBR9gk0mmBpUd8NhPggCfQTti
PAVBW3vp6eKSWu9LtPUVBpw=
=F15b
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: otp_src_R11B-5-freebsd_sctp-a.patch
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070707/d21779c5/attachment.ksh>


More information about the erlang-questions mailing list