]> granicus.if.org Git - libevent/commitdiff
Numerous opensolaris compilation fixes
authorNick Mathewson <nickm@torproject.org>
Sat, 8 May 2010 22:09:27 +0000 (18:09 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 8 May 2010 23:34:09 +0000 (19:34 -0400)
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
buffer.c
configure.in
evport.c

index 21334b47558d15bab9d3daef3bad57c03fe97a63..6171e9999b1bd82298d57e64e10c8a0a6b550559 100644 (file)
 #include <unistd.h>
 #include <sys/param.h>
 #include <sys/time.h>
+#ifdef _EVENT_HAVE_SYS_SYSCTL_H
 #include <sys/sysctl.h>
 #endif
+#endif
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
index 5a48802346e21ef234db445978ae4dbfe4206cff..6e0a838043bfa4b54099f0a6759fa72443209773 100644 (file)
--- 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<n_vecs; ++i) {
                if (!chain)
                        goto done;
-               if (vec[i].iov_base != CHAIN_SPACE_PTR(chain) ||
+               if (vec[i].iov_base != (void*)CHAIN_SPACE_PTR(chain) ||
                    vec[i].iov_len > CHAIN_SPACE_LEN(chain))
                        goto done;
                chain = chain->next;
index e65633fbf805af4840183b68074f5efc88517971..2357db41843ffe8159b356ddd3ffa55cca2562ce 100644 (file)
@@ -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
index 0eb73ca163d27799f7fa83e1ca49dd8691398079..4c046bcdf677f088a961540b47159c424a3c2045 100644 (file)
--- 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 */
 };
 
 /*