From 4a1d13672133453c32ad030b25e63e5f45b4855a Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 26 Oct 2023 16:41:57 +0000 Subject: [PATCH] Report 'haiku' as a platform, and don't bind to :: on it, because that doesn't seem to be working. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4587 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/httpd.js | 2 +- src/task.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/httpd.js b/core/httpd.js index 49339deb..8db93f3e 100644 --- a/core/httpd.js +++ b/core/httpd.js @@ -519,7 +519,7 @@ function handleConnection(client) { } let kBacklog = 8; -let kHost = '::'; +let kHost = platform() == 'haiku' ? 'localhost' : '::'; let socket = new Socket(); socket.bind(kHost, tildefriends.http_port).then(function(port) { diff --git a/src/task.c b/src/task.c index 746c6f07..6e1b771a 100644 --- a/src/task.c +++ b/src/task.c @@ -715,6 +715,8 @@ static JSValue _tf_task_platform(JSContext* context, JSValueConst this_val, int #endif #elif defined(__linux__) return JS_NewString(context, "linux"); +#elif defined(__HAIKU__) + return JS_NewString(context, "haiku"); #else return JS_NewString(context, "other"); #endif