diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-22 23:27:08 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-22 23:27:08 +0100 |
commit | 7fdc35bb45bff6b819cf13f981725054dc91a51a (patch) | |
tree | adffc2003a2ff00552e9751ba5d31c48ace4597b /libs | |
parent | d7ef188aead1bea1634d5f9ed63d359c79b384ec (diff) |
Fix Unix compile with older libwebsockets
Debian/Ubuntu still only ship libwebsockets 2.x.
Recent libWS abstracts the poll interface to be
compatible with Windows.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/websockets/server.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index c5b557a0c5..b4f599d949 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -23,6 +23,21 @@ #include "server.h" #include "dispatcher.h" +/* backport from libwebsockets 3.0, + * allow to compile on GNU/Linux with libwebsockets 2.x + */ +#ifndef PLATFORM_WINDOWS +# ifndef LWS_POLLHUP +# define LWS_POLLHUP (POLLHUP|POLLERR) +# endif +# ifndef LWS_POLLIN +# define LWS_POLLIN (POLLIN) +# endif +# ifndef LWS_POLLOUT +# define LWS_POLLOUT (POLLOUT) +# endif +#endif + using namespace Glib; WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) |