mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
make it compile on solaris; from Andrei Nigmatulin
svn:r366
This commit is contained in:
parent
d1848a8872
commit
aa5c806888
@ -2,7 +2,7 @@ dnl configure.in for libevent
|
||||
dnl Dug Song <dugsong@monkey.org>
|
||||
AC_INIT(event.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(libevent,1.3b)
|
||||
AM_INIT_AUTOMAKE(libevent,1.3c-trunk)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
@ -36,6 +36,7 @@ AC_ARG_WITH(rtsig,
|
||||
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
AC_CHECK_LIB(resolv, inet_aton)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <sys/_time.h>
|
||||
#endif
|
||||
#include <sys/queue.h>
|
||||
#include <sys/tree.h>
|
||||
#include <sys/devpoll.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
@ -47,6 +48,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "event.h"
|
||||
#include "event-internal.h"
|
||||
#include "evsignal.h"
|
||||
#include "log.h"
|
||||
|
||||
|
@ -149,7 +149,7 @@ evtag_marshal_timeval(struct evbuffer *evbuf, u_int8_t tag, struct timeval *tv)
|
||||
EVBUFFER_LENGTH(_buf));
|
||||
}
|
||||
|
||||
static int __inline
|
||||
static int inline
|
||||
decode_int_internal(u_int32_t *pnumber, struct evbuffer *evbuf, int dodrain)
|
||||
{
|
||||
u_int32_t number = 0;
|
||||
|
19
evport.c
19
evport.c
@ -126,6 +126,7 @@ static int evport_add (void *, struct event *);
|
||||
static int evport_del (void *, struct event *);
|
||||
static int evport_recalc (struct event_base *, void *, int);
|
||||
static int evport_dispatch (struct event_base *, void *, struct timeval *);
|
||||
static void evport_dealloc (struct event_base *, void *);
|
||||
|
||||
const struct eventop evportops = {
|
||||
"event ports",
|
||||
@ -133,7 +134,8 @@ const struct eventop evportops = {
|
||||
evport_add,
|
||||
evport_del,
|
||||
evport_recalc,
|
||||
evport_dispatch
|
||||
evport_dispatch,
|
||||
evport_dealloc
|
||||
};
|
||||
|
||||
/*
|
||||
@ -328,7 +330,7 @@ evport_dispatch(struct event_base *base, void *arg, struct timeval *tv)
|
||||
}
|
||||
|
||||
if ((res = port_getn(epdp->ed_port, pevtlist, EVENTS_PER_GETN,
|
||||
&nevents, &ts)) == -1) {
|
||||
(unsigned int *) &nevents, &ts)) == -1) {
|
||||
if (errno == EINTR) {
|
||||
evsignal_process(base);
|
||||
return (0);
|
||||
@ -496,3 +498,16 @@ evport_del(void *arg, struct event *ev)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
evport_dealloc(struct event_base *base, void *arg)
|
||||
{
|
||||
struct evport_data *evpd = arg;
|
||||
|
||||
evsignal_dealloc(base);
|
||||
|
||||
close(evpd->ed_port);
|
||||
|
||||
if (evpd->ed_fds)
|
||||
free(evpd->ed_fds);
|
||||
free(evpd);
|
||||
}
|
||||
|
2
http.c
2
http.c
@ -1570,7 +1570,7 @@ evhttp_send_error(struct evhttp_request *req, int error, const char *reason)
|
||||
|
||||
/* Requires that headers and response code are already set up */
|
||||
|
||||
static __inline void
|
||||
static inline void
|
||||
evhttp_send(struct evhttp_request *req, struct evbuffer *databuf)
|
||||
{
|
||||
struct evhttp_connection *evcon = req->evcon;
|
||||
|
Loading…
x
Reference in New Issue
Block a user