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
This commit is contained in:
Cory McWilliams 2023-10-26 16:41:57 +00:00
parent ab3009f771
commit 4a1d136721
2 changed files with 3 additions and 1 deletions

View File

@ -519,7 +519,7 @@ function handleConnection(client) {
} }
let kBacklog = 8; let kBacklog = 8;
let kHost = '::'; let kHost = platform() == 'haiku' ? 'localhost' : '::';
let socket = new Socket(); let socket = new Socket();
socket.bind(kHost, tildefriends.http_port).then(function(port) { socket.bind(kHost, tildefriends.http_port).then(function(port) {

View File

@ -715,6 +715,8 @@ static JSValue _tf_task_platform(JSContext* context, JSValueConst this_val, int
#endif #endif
#elif defined(__linux__) #elif defined(__linux__)
return JS_NewString(context, "linux"); return JS_NewString(context, "linux");
#elif defined(__HAIKU__)
return JS_NewString(context, "haiku");
#else #else
return JS_NewString(context, "other"); return JS_NewString(context, "other");
#endif #endif