File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 9
9
#include < test/fuzz/util.h>
10
10
11
11
#include < event2/buffer.h>
12
+ #include < event2/event.h>
12
13
#include < event2/http.h>
13
14
#include < event2/http_struct.h>
14
15
17
18
#include < string>
18
19
#include < vector>
19
20
21
+ // workaround for libevent versions before 2.1.1,
22
+ // when internal functions didn't have underscores at the end
23
+ #if LIBEVENT_VERSION_NUMBER < 0x02010100
24
+ extern " C" int evhttp_parse_firstline (struct evhttp_request *, struct evbuffer *);
25
+ extern " C" int evhttp_parse_headers (struct evhttp_request *, struct evbuffer *);
26
+ inline int evhttp_parse_firstline_ (struct evhttp_request * r, struct evbuffer * b)
27
+ {
28
+ return evhttp_parse_firstline (r, b);
29
+ }
30
+ inline int evhttp_parse_headers_ (struct evhttp_request * r, struct evbuffer * b)
31
+ {
32
+ return evhttp_parse_headers (r, b);
33
+ }
34
+ #else
20
35
extern " C" int evhttp_parse_firstline_ (struct evhttp_request *, struct evbuffer *);
21
36
extern " C" int evhttp_parse_headers_ (struct evhttp_request *, struct evbuffer *);
37
+ #endif
38
+
22
39
std::string RequestMethodString (HTTPRequest::RequestMethod m);
23
40
24
41
void test_one_input (const std::vector<uint8_t >& buffer)
You can’t perform that action at this time.
0 commit comments