Skip to content

Commit

Permalink
Fix h2 build broken in r1913019:
Browse files Browse the repository at this point in the history
* modules/http2: Make WebSockets support conditional also
  on APR 1.7.x since apr_encode.h is required. Restore
  #include "apr_encode.h" removed in previous commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1913023 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Oct 16, 2023
1 parent 931c39c commit b2ef1b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/http2/h2.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ struct h2_stream;
#define H2_USE_POLLFD_FROM_CONN 0
#endif

#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200
/* WebSockets support requires apr 1.7.0 for apr_encode.h, plus the
* WebSockets features of nghttp2 1.34.0 and later. */
#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200 && APR_VERSION_AT_LEAST(1,7,0)
#define H2_USE_WEBSOCKETS 1
#else
#define H2_USE_WEBSOCKETS 0
Expand Down
2 changes: 2 additions & 0 deletions modules/http2/h2_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

#if H2_USE_WEBSOCKETS

#include "apr_encode.h" /* H2_USE_WEBSOCKETS is conditional on APR 1.6+ */

static ap_filter_rec_t *c2_ws_out_filter_handle;

struct ws_filter_ctx {
Expand Down

2 comments on commit b2ef1b5

@FireBurn
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that comment say APR 1.7+ ?

@notroj
Copy link
Collaborator Author

@notroj notroj commented on b2ef1b5 Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good catch, thanks. Fixed in a2008e6

Please sign in to comment.