[Libevent-users] [PATCH] Compiling on Solaris/OpenSolaris with Sun Studio 12

Magne Mæhre Magne.Mahre at Sun.COM
Thu Sep 6 14:15:40 EDT 2007


I tried to build 1.3d and svn trunk today, and came across a couple of issues.
A patch is attached that remedies these problems, and I _think_ they won't break
anything.

1. configure.in
  a) Added AC_CHECK_LIB for  inet_ntoa in libnsl  (it's where it lives on Solaris)

  b) Changed the checks for __func__ and __FUNCTION__ so it no longer tries to
     declare an inner function (the void foo() {}).  Inner functions are not
     allowed in ISO C, so even though gcc accepts it, other compilers
     (like Sun Studio) don't.

2. test/regress.c

  a) Changed references for u_int32_t  to uint32_t, since the latter is C99,
     and is also what's tested for in the configure script.


--Magne


-------------- next part --------------
A non-text attachment was scrubbed...
Name: libevent-solaris.diff
Type: text/x-patch
Size: 1583 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070906/c0ef2304/libevent-solaris.bin


More information about the Libevent-users mailing list