From c44de06c766906a7d90f5dcb99877caafad241af Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 8 May 2010 18:09:27 -0400 Subject: [PATCH] Numerous opensolaris compilation fixes For future note, opensolaris doesn't have sys/sysctl.h, doesn't like comparing iov_buf to a chain_space_ptr without a cast, and is (predictably) unforgiving of dumb syntax errors. Also, we had accidentally broken the devpoll backend test in configure.in --- arc4random.c | 2 ++ buffer.c | 4 ++-- configure.in | 2 +- evport.c | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arc4random.c b/arc4random.c index 21334b47..6171e999 100644 --- a/arc4random.c +++ b/arc4random.c @@ -57,8 +57,10 @@ #include #include #include +#ifdef _EVENT_HAVE_SYS_SYSCTL_H #include #endif +#endif #include #include #include diff --git a/buffer.c b/buffer.c index 5a488023..6e0a8380 100644 --- a/buffer.c +++ b/buffer.c @@ -615,7 +615,7 @@ evbuffer_commit_space(struct evbuffer *buf, result = 0; goto done; } else if (n_vecs == 1 && - (buf->last && vec[0].iov_base == CHAIN_SPACE_PTR(buf->last))) { + (buf->last && vec[0].iov_base == (void*)CHAIN_SPACE_PTR(buf->last))) { /* The user only got or used one chain; it might not * be the first one with space in it. */ if (vec[0].iov_len > CHAIN_SPACE_LEN(buf->last)) @@ -641,7 +641,7 @@ evbuffer_commit_space(struct evbuffer *buf, for (i=0; i CHAIN_SPACE_LEN(chain)) goto done; chain = chain->next; diff --git a/configure.in b/configure.in index e65633fb..2357db41 100644 --- a/configure.in +++ b/configure.in @@ -287,7 +287,7 @@ if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then AC_DEFINE(HAVE_DEVPOLL, 1, [Define if /dev/poll is available]) fi -AM_CONDITIONAL(DEVPOLL_BACKEND, [test "ac_cv_header_sys_devpoll_h" = "xyes"]) +AM_CONDITIONAL(DEVPOLL_BACKEND, [test "x$ac_cv_header_sys_devpoll_h" = "xyes"]) havekqueue=no if test "x$ac_cv_header_sys_event_h" = "xyes"; then diff --git a/evport.c b/evport.c index 0eb73ca1..4c046bcd 100644 --- a/evport.c +++ b/evport.c @@ -124,7 +124,8 @@ const struct eventop evportops = { evport_dispatch, evport_dealloc, 1, /* need reinit */ - 0 + 0, /* features */ + 0, /* fdinfo length */ }; /* -- 2.50.1