mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 09:46:23 -04:00
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
This commit is contained in:
parent
f89168e7ea
commit
c44de06c76
@ -57,8 +57,10 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef _EVENT_HAVE_SYS_SYSCTL_H
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
4
buffer.c
4
buffer.c
@ -615,7 +615,7 @@ evbuffer_commit_space(struct evbuffer *buf,
|
|||||||
result = 0;
|
result = 0;
|
||||||
goto done;
|
goto done;
|
||||||
} else if (n_vecs == 1 &&
|
} 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
|
/* The user only got or used one chain; it might not
|
||||||
* be the first one with space in it. */
|
* be the first one with space in it. */
|
||||||
if (vec[0].iov_len > CHAIN_SPACE_LEN(buf->last))
|
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) {
|
for (i=0; i<n_vecs; ++i) {
|
||||||
if (!chain)
|
if (!chain)
|
||||||
goto done;
|
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))
|
vec[i].iov_len > CHAIN_SPACE_LEN(chain))
|
||||||
goto done;
|
goto done;
|
||||||
chain = chain->next;
|
chain = chain->next;
|
||||||
|
@ -287,7 +287,7 @@ if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then
|
|||||||
AC_DEFINE(HAVE_DEVPOLL, 1,
|
AC_DEFINE(HAVE_DEVPOLL, 1,
|
||||||
[Define if /dev/poll is available])
|
[Define if /dev/poll is available])
|
||||||
fi
|
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
|
havekqueue=no
|
||||||
if test "x$ac_cv_header_sys_event_h" = "xyes"; then
|
if test "x$ac_cv_header_sys_event_h" = "xyes"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user