From 9383610ad15c7163f731e21c0922600c37e0634a Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 8 Nov 2024 12:38:16 +0100 Subject: [PATCH] [Web] Disable UNIX sockets They are not supported anyway, emscripten has an emulation layer that implements them over WebSocket/WebRTC, which is really surprising for users, and also not very useful since we have proper WebSocket and WebRTC support. This can make the build smaller, if we also disable the UPNP module (which will otherwise include a third party library referencing "socket" thus forcing emscripten to include the compatibility layer) --- platform/web/detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/web/detect.py b/platform/web/detect.py index 26bbbccffa5..25a5bbe5a59 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -201,7 +201,7 @@ def configure(env: "SConsEnvironment"): sys.exit(255) env.Prepend(CPPPATH=["#platform/web"]) - env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"]) + env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED", "UNIX_SOCKET_UNAVAILABLE"]) if env["opengl3"]: env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"])