summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/netdb.cpp5
-rw-r--r--Userland/Services/LookupServer/LookupServer.ipc3
2 files changed, 5 insertions, 3 deletions
diff --git a/Userland/Libraries/LibC/netdb.cpp b/Userland/Libraries/LibC/netdb.cpp
index 7c0f973da3..5852f982f4 100644
--- a/Userland/Libraries/LibC/netdb.cpp
+++ b/Userland/Libraries/LibC/netdb.cpp
@@ -27,12 +27,13 @@ static in_addr_t* __gethostbyname_address_list_buffer[2];
static hostent __gethostbyaddr_buffer;
static in_addr_t* __gethostbyaddr_address_list_buffer[2];
-// XXX: IPCCompiler depends on LibC. Because of this, it cannot be compiled
+// IPCCompiler depends on LibC. Because of this, it cannot be compiled
// before LibC is. However, the lookup magic can only be obtained from the
// endpoint itself if IPCCompiler has compiled the IPC file, so this creates
// a chicken-and-egg situation. Because of this, the LookupServer endpoint magic
// is hardcoded here.
-static constexpr i32 lookup_server_endpoint_magic = 9001;
+// Keep the name synchronized with LookupServer/LookupServer.ipc.
+static constexpr i32 lookup_server_endpoint_magic = "LookupServer"sv.hash();
// Get service entry buffers and file information for the getservent() family of functions.
static FILE* services_file = nullptr;
diff --git a/Userland/Services/LookupServer/LookupServer.ipc b/Userland/Services/LookupServer/LookupServer.ipc
index de694e6f9f..ab1a6475fa 100644
--- a/Userland/Services/LookupServer/LookupServer.ipc
+++ b/Userland/Services/LookupServer/LookupServer.ipc
@@ -1,4 +1,5 @@
-endpoint LookupServer [magic=9001]
+// Keep the name synchronized with LibC/netdb.cpp, constant 'lookup_server_endpoint_magic'.
+endpoint LookupServer
{
lookup_name(String name) => (int code, Vector<String> addresses)
lookup_address(String address) => (int code, String name)