Index: uspace/lib/c/generic/loc.c
===================================================================
--- uspace/lib/c/generic/loc.c	(revision 72ac106d682c5a2dca554337cbc1611901fa41af)
+++ uspace/lib/c/generic/loc.c	(revision 4c6fd56b8079778d8d40e0d5ffc6a1e8e8ad2b5b)
@@ -1,5 +1,5 @@
 /*
+ * Copyright (c) 2023 Jiri Svoboda
  * Copyright (c) 2007 Josef Cejka
- * Copyright (c) 2011 Jiri Svoboda
  * All rights reserved.
  *
@@ -239,8 +239,23 @@
 }
 
-/** Register new server with loc. */
-errno_t loc_server_register(const char *name)
-{
-	async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
+/** Register new server with loc.
+ *
+ * XXX Proper impementation - currently cannot actually call
+ * this function more than once.
+ *
+ * @param name Server name
+ * @param rsrv Place to store new server object on success
+ * @return EOK on succes or an error code
+ */
+errno_t loc_server_register(const char *name, loc_srv_t **rsrv)
+{
+	async_exch_t *exch;
+	loc_srv_t *srv;
+
+	srv = calloc(1, sizeof(loc_srv_t));
+	if (srv == NULL)
+		return ENOMEM;
+
+	exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
 
 	ipc_call_t answer;
@@ -251,4 +266,5 @@
 		async_forget(req);
 		loc_exchange_end(exch);
+		free(srv);
 		return retval;
 	}
@@ -264,16 +280,39 @@
 	loc_exchange_end(exch);
 
+	if (retval != EOK) {
+		free(srv);
+		return retval;
+	}
+
+	*rsrv = srv;
 	return retval;
 }
 
+/** Unregister server from loc.
+ *
+ * Unregister server and free server object.
+ *
+ * XXX Proper implementation
+ *
+ * @param srv Server object
+ */
+void loc_server_unregister(loc_srv_t *srv)
+{
+	free(srv);
+}
+
 /** Register new service.
  *
- * @param      fqsn  Fully qualified service name
- * @param[out] sid   Service ID of new service
- *
- */
-errno_t loc_service_register(const char *fqsn, service_id_t *sid)
+ * @param srv Server object
+ * @param fqsn Fully qualified service name
+ * @param sid  Service ID of new service
+ *
+ */
+errno_t loc_service_register(loc_srv_t *srv, const char *fqsn,
+    service_id_t *sid)
 {
 	async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
+
+	(void)srv;
 
 	ipc_call_t answer;
@@ -310,10 +349,13 @@
 /** Unregister service.
  *
- * @param sid	Service ID
- */
-errno_t loc_service_unregister(service_id_t sid)
+ * @param srv Server object
+ * @param sid Service ID
+ */
+errno_t loc_service_unregister(loc_srv_t *srv, service_id_t sid)
 {
 	async_exch_t *exch;
 	errno_t retval;
+
+	(void)srv;
 
 	exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
@@ -611,9 +653,12 @@
 /** Add service to category.
  *
- * @param svc_id	Service ID
- * @param cat_id	Category ID
- * @return		EOK on success or an error code
- */
-errno_t loc_service_add_to_cat(service_id_t svc_id, service_id_t cat_id)
+ * @param srv    Server object
+ * @param svc_id Service ID
+ * @param cat_id Category ID
+ *
+ * @return EOK on success or an error code
+ */
+errno_t loc_service_add_to_cat(loc_srv_t *srv, service_id_t svc_id,
+    service_id_t cat_id)
 {
 	async_exch_t *exch;
Index: uspace/lib/c/include/loc.h
===================================================================
--- uspace/lib/c/include/loc.h	(revision 72ac106d682c5a2dca554337cbc1611901fa41af)
+++ uspace/lib/c/include/loc.h	(revision 4c6fd56b8079778d8d40e0d5ffc6a1e8e8ad2b5b)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2009 Jiri Svoboda
+ * Copyright (c) 2023 Jiri Svoboda
  * All rights reserved.
  *
@@ -39,4 +39,5 @@
 #include <async.h>
 #include <stdbool.h>
+#include <types/loc.h>
 
 typedef void (*loc_cat_change_cb_t)(void *);
@@ -46,8 +47,9 @@
 extern void loc_exchange_end(async_exch_t *);
 
-extern errno_t loc_server_register(const char *);
-extern errno_t loc_service_register(const char *, service_id_t *);
-extern errno_t loc_service_unregister(service_id_t);
-extern errno_t loc_service_add_to_cat(service_id_t, category_id_t);
+extern errno_t loc_server_register(const char *, loc_srv_t **);
+extern void loc_server_unregister(loc_srv_t *);
+extern errno_t loc_service_register(loc_srv_t *, const char *, service_id_t *);
+extern errno_t loc_service_unregister(loc_srv_t *, service_id_t);
+extern errno_t loc_service_add_to_cat(loc_srv_t *, service_id_t, category_id_t);
 
 extern errno_t loc_service_get_id(const char *, service_id_t *,
Index: uspace/lib/c/include/types/loc.h
===================================================================
--- uspace/lib/c/include/types/loc.h	(revision 4c6fd56b8079778d8d40e0d5ffc6a1e8e8ad2b5b)
+++ uspace/lib/c/include/types/loc.h	(revision 4c6fd56b8079778d8d40e0d5ffc6a1e8e8ad2b5b)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2023 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef _LIBC_TYPES_LOC_H_
+#define _LIBC_TYPES_LOC_H_
+
+/** Server register with location service */
+typedef struct {
+	int dummy;
+} loc_srv_t;
+
+#endif
+
+/** @}
+ */
