From 318e0c8447e2399e7c1e95d8ae8d00118ccea5f7 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 28 Sep 2021 22:35:53 +0900 Subject: [PATCH] Guard msghdr_get_local_addr with ENABLE_HTTP3 macro --- src/util.cc | 2 ++ src/util.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/util.cc b/src/util.cc index 4491a07d..4db6325d 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1688,6 +1688,7 @@ int daemonize(int nochdir, int noclose) { #endif // !defined(__APPLE__) } +#ifdef ENABLE_HTTP3 int msghdr_get_local_addr(Address &dest, msghdr *msg, int family) { switch (family) { case AF_INET: @@ -1721,6 +1722,7 @@ int msghdr_get_local_addr(Address &dest, msghdr *msg, int family) { return -1; } +#endif // ENABLE_HTTP3 } // namespace util diff --git a/src/util.h b/src/util.h index 70f97f09..4d5cef37 100644 --- a/src/util.h +++ b/src/util.h @@ -916,7 +916,9 @@ std::mt19937 make_mt19937(); // daemon() using fork(). int daemonize(int nochdir, int noclose); +#ifdef ENABLE_HTTP3 int msghdr_get_local_addr(Address &dest, msghdr *msg, int family); +#endif // ENABLE_HTTP3 } // namespace util