Skip to content

Commit 171aae9

Browse files
committed
quic: add shared openssl build guard
1 parent 70695c3 commit 171aae9

File tree

6 files changed

+16
-1
lines changed

6 files changed

+16
-1
lines changed

src/quic/cid.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
12
#include "cid.h"
23
#include <crypto/crypto_util.h>
34
#include <memory_tracker-inl.h>
@@ -148,3 +149,4 @@ const CID::Factory& CID::Factory::random() {
148149

149150
} // namespace quic
150151
} // namespace node
152+
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC

src/quic/cid.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
4-
4+
#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
55
#include <memory_tracker.h>
66
#include <ngtcp2/ngtcp2.h>
77
#include <string>
@@ -122,4 +122,5 @@ class CID::Factory {
122122
} // namespace quic
123123
} // namespace node
124124

125+
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
125126
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/data.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
2+
13
#include "data.h"
24
#include <env-inl.h>
35
#include <memory_tracker-inl.h>
@@ -253,3 +255,5 @@ QuicError QuicError::INTERNAL_ERROR =
253255

254256
} // namespace quic
255257
} // namespace node
258+
259+
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC

src/quic/data.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
4+
#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
45

56
#include <memory_tracker.h>
67
#include <nghttp3/nghttp3.h>
@@ -132,4 +133,5 @@ class QuicError final : public MemoryRetainer {
132133
} // namespace quic
133134
} // namespace node
134135

136+
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
135137
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/preferredaddress.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
2+
13
#include "preferredaddress.h"
24
#include <env-inl.h>
35
#include <ngtcp2/ngtcp2.h>
@@ -153,3 +155,5 @@ void PreferredAddress::Set(ngtcp2_transport_params* params,
153155

154156
} // namespace quic
155157
} // namespace node
158+
159+
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC

src/quic/preferredaddress.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
4+
#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
45

56
#include <env.h>
67
#include <ngtcp2/ngtcp2.h>
@@ -67,4 +68,5 @@ class PreferredAddress final {
6768
} // namespace quic
6869
} // namespace node
6970

71+
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
7072
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

0 commit comments

Comments
 (0)