Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

--compiler_warnings;

Unfortunately does the libevent2 version of evhttp.h generate a compiler warning
which is now avoided by using event2/http.h instead.
  • Loading branch information...
commit 2dbc0df653a9955a3255ec25dd6d47513c86b87c 1 parent f383e38
@d1saster authored
View
4 CMake/HPHPFindLibs.cmake
@@ -77,6 +77,10 @@ if (NOT HAVE_CUSTOM_LIBEVENT)
unset(LIBEVENT_LIB CACHE)
unset(LibEvent_FOUND CACHE)
message(FATAL_ERROR "Custom libevent is required with HipHop patches")
+else ()
+ if (EXISTS "${LIBEVENT_INCLUDE_DIR}/event2/http.h")
+ add_definitions(-DHPHP_HAVE_LIBEVENT2)
+ endif()
endif ()
set(CMAKE_REQUIRED_LIBRARIES)
View
7 src/runtime/base/server/libevent_transport.h
@@ -18,7 +18,14 @@
#define __HTTP_SERVER_LIB_EVENT_TRANSPORT_H__
#include <runtime/base/server/transport.h>
+#ifdef HPHP_HAVE_LIBEVENT2
+#include <event.h>
+#include <event2/http.h>
+#include <event2/http_struct.h>
+#include <event2/http_compat.h>
+#else
#include <evhttp.h>
+#endif
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
View
7 src/runtime/base/util/libevent_http_client.h
@@ -20,7 +20,14 @@
#include <util/base.h>
#include <util/async_func.h>
#include <util/lock.h>
+#ifdef HPHP_HAVE_LIBEVENT2
+#include <event.h>
+#include <event2/http.h>
+#include <event2/http_struct.h>
+#include <event2/http_compat.h>
+#else
#include <evhttp.h>
+#endif
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
View
7 src/runtime/ext/ext_imagesprite_include.h
@@ -19,7 +19,14 @@
#define __EXT_IMAGESPRITE_INCLUDE_H__
#include <runtime/base/base_includes.h>
+#ifdef HPHP_HAVE_LIBEVENT2
+#include <event.h>
+#include <event2/http.h>
+#include <event2/http_struct.h>
+#include <event2/http_compat.h>
+#else
#include <evhttp.h>
+#endif
#include <gd.h>
namespace HPHP {
Please sign in to comment.
Something went wrong with that request. Please try again.