Skip to content

Commit

Permalink
Numerous opensolaris compilation fixes
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nmathewson committed May 8, 2010
1 parent f89168e commit c44de06
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions arc4random.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@
#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>
Expand Down
4 changes: 2 additions & 2 deletions buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion evport.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ const struct eventop evportops = {
evport_dispatch,
evport_dealloc,
1, /* need reinit */
0
0, /* features */
0, /* fdinfo length */
};

/*
Expand Down

0 comments on commit c44de06

Please sign in to comment.