From 9c3ac4e444bdacff2b904b1d175e4ac3cb2f7da5 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 7 Sep 2007 00:10:15 +0000 Subject: [PATCH] r14970@catbus: nickm | 2007-09-06 20:09:39 -0400 Fix compilation on Solaris; Patch from Magne Mahre. svn:r409 --- ChangeLog | 1 + configure.in | 5 +++-- test/regress.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 472741e9..a2ee6f63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ Changes in current version: o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. o demote most http warnings to debug messages + o Fix Solaris compilation; from Magne Mahre diff --git a/configure.in b/configure.in index 1d54db2c..0e7585e8 100644 --- a/configure.in +++ b/configure.in @@ -38,6 +38,7 @@ dnl Checks for libraries. AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(resolv, inet_aton) AC_CHECK_LIB(rt, clock_gettime) +AC_CHECK_LIB(nsl, inet_ntoa) dnl Checks for header files. AC_HEADER_STDC @@ -367,12 +368,12 @@ AC_TRY_COMPILE([ AC_MSG_CHECKING([whether our compiler supports __func__]) AC_TRY_COMPILE([], - [void foo() { const char *cp = __func__; }], + [ const char *cp = __func__; ], AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) AC_MSG_CHECKING([whether our compiler supports __FUNCTION__]) AC_TRY_COMPILE([], - [void foo() { const char *cp = __FUNCTION__; }], + [ const char *cp = __FUNCTION__; ], AC_MSG_RESULT([yes]) AC_DEFINE(__func__, __FUNCTION__, [Define to appropriate substitue if compiler doesnt have __func__]), diff --git a/test/regress.c b/test/regress.c index 112f870f..99ba2b41 100644 --- a/test/regress.c +++ b/test/regress.c @@ -821,7 +821,7 @@ test_multiple_events_for_same_fd(void) cleanup_test(); } -int decode_int(u_int32_t *pnumber, struct evbuffer *evbuf); +int decode_int(uint32_t *pnumber, struct evbuffer *evbuf); void read_once_cb(int fd, short event, void *arg) @@ -872,10 +872,10 @@ void evtag_int_test(void) { struct evbuffer *tmp = evbuffer_new(); - u_int32_t integers[TEST_MAX_INT] = { + uint32_t integers[TEST_MAX_INT] = { 0xaf0, 0x1000, 0x1, 0xdeadbeef, 0x00, 0xbef000 }; - u_int32_t integer; + uint32_t integer; int i; for (i = 0; i < TEST_MAX_INT; i++) {