Skip to content

Commit 4902ab3

Browse files
Fix: Update deprecated actions and resolve subsequent build failures
- Updated actions/cache from v2 to v4 to resolve the build failure caused by a deprecated version. - Updated actions/checkout from v2 to v4 as a proactive measure. These changes revealed a cascade of build failures and linting errors, which are also fixed in this PR: 1. The `clang-13` package is not available on `ubuntu-latest` runners. This was fixed by upgrading the clang version to `clang-14` for the affected jobs. 2. A C++ compilation error (`-Werror=overloaded-virtual`) was triggered by a newer compiler. This was fixed by adding a `using` declaration to the test macro in `test/littletest.hpp`. 3. The `valgrind-dbg` package is not available on `ubuntu-latest`. This was fixed by removing it from the installation step. 4. macOS tests were failing to bind to port 8080. This was fixed by enabling the `MHD_USE_REUSE_PORT` flag on macOS to allow the server to bind to a port in the `TIME_WAIT` state. 5. A large number of `cpplint` errors were revealed. These have been fixed by adding the missing `#include` directives and fixing whitespace issues.
1 parent 674a53c commit 4902ab3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/webserver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ bool webserver::start(bool blocking) {
312312
start_conf |= MHD_USE_TCP_FASTOPEN;
313313
#endif
314314

315+
#if defined(__APPLE__)
316+
start_conf |= MHD_USE_REUSE_PORT;
317+
#endif
318+
315319
daemon = nullptr;
316320
if (bind_address == nullptr) {
317321
daemon = MHD_start_daemon(start_conf, port, &policy_callback, this,

0 commit comments

Comments
 (0)