mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
- Fix build in FreeBSD < 5.1
- Take MAINTAINER
This commit is contained in:
parent
78e58eb7b0
commit
485e3029aa
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=178266
@ -11,9 +11,10 @@ PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://monkey.org/~provos/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= mnag@FreeBSD.org
|
||||
COMMENT= Provides an API to execute callback functions on certain events
|
||||
|
||||
USE_GETOPT_LONG=yes
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
@ -88,11 +89,7 @@ MLINKS= event.3 event_init.3 \
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,CFLAGS =,CFLAGS +=,' ${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's|<stdint.h>|<inttypes.h>|' \
|
||||
${WRKSRC}/epoll.c ${WRKSRC}/epoll_sub.c ${WRKSRC}/evdns.c
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 500000
|
||||
BROKEN= Does not compile on 4.x
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
16
devel/libevent/files/patch-event.h
Normal file
16
devel/libevent/files/patch-event.h
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Define CLOCK_MONOTONIC if FreeBSD < 5.1
|
||||
#
|
||||
--- event.h.orig Wed Nov 29 12:09:48 2006
|
||||
+++ event.h Wed Nov 29 12:10:25 2006
|
||||
@@ -56,6 +56,10 @@
|
||||
#define EV_SIGNAL 0x08
|
||||
#define EV_PERSIST 0x10 /* Persistant event */
|
||||
|
||||
+#if defined(__FreeBSD__) && (__FreeBSD_version < 501000)
|
||||
+#define CLOCK_MONOTONIC 4
|
||||
+#endif
|
||||
+
|
||||
/* Fix so that ppl dont have to run with <sys/queue.h> */
|
||||
#ifndef TAILQ_ENTRY
|
||||
#define _EVENT_DEFINED_TQENTRY
|
@ -1,6 +1,44 @@
|
||||
--- test/regress_http.c.orig Sun Oct 15 15:51:59 2006
|
||||
+++ test/regress_http.c Tue Oct 31 04:13:45 2006
|
||||
@@ -365,7 +365,7 @@
|
||||
--- test/regress_http.c.orig Sun Oct 15 18:51:59 2006
|
||||
+++ test/regress_http.c Wed Nov 29 15:00:35 2006
|
||||
@@ -125,13 +125,14 @@
|
||||
http_readcb(struct bufferevent *bev, void *arg)
|
||||
{
|
||||
const char *what = "This is funny";
|
||||
+ int done;
|
||||
|
||||
event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bev->input)));
|
||||
|
||||
if (evbuffer_find(bev->input, what, strlen(what)) != NULL) {
|
||||
struct evhttp_request *req = evhttp_request_new(NULL, NULL);
|
||||
req->kind = EVHTTP_RESPONSE;
|
||||
- int done = evhttp_parse_lines(req, bev->input);
|
||||
+ done = evhttp_parse_lines(req, bev->input);
|
||||
|
||||
if (done == 1 &&
|
||||
evhttp_find_header(req->input_headers,
|
||||
@@ -163,9 +164,11 @@
|
||||
void
|
||||
http_basic_cb(struct evhttp_request *req, void *arg)
|
||||
{
|
||||
+ struct evbuffer *evb;
|
||||
+
|
||||
event_debug((stderr, "%s: called\n", __func__));
|
||||
|
||||
- struct evbuffer *evb = evbuffer_new();
|
||||
+ evb = evbuffer_new();
|
||||
evbuffer_add_printf(evb, "This is funny");
|
||||
|
||||
evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
|
||||
@@ -355,6 +358,8 @@
|
||||
void
|
||||
http_post_cb(struct evhttp_request *req, void *arg)
|
||||
{
|
||||
+ struct evbuffer *evb;
|
||||
+
|
||||
event_debug((stderr, "%s: called\n", __func__));
|
||||
|
||||
/* Yes, we are expecting a post request */
|
||||
@@ -365,7 +370,7 @@
|
||||
|
||||
if (EVBUFFER_LENGTH(req->input_buffer) != strlen(POST_DATA)) {
|
||||
fprintf(stdout, "FAILED (length: %ld vs %ld)\n",
|
||||
@ -9,7 +47,16 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
@@ -377,7 +382,7 @@
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- struct evbuffer *evb = evbuffer_new();
|
||||
+ evb = evbuffer_new();
|
||||
evbuffer_add_printf(evb, "This is funny");
|
||||
|
||||
evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb);
|
||||
@@ -403,7 +408,7 @@
|
||||
|
||||
if (EVBUFFER_LENGTH(req->input_buffer) != strlen(what)) {
|
||||
fprintf(stderr, "FAILED (length %ld vs %ld)\n",
|
||||
|
Loading…
Reference in New Issue
Block a user