Index: libcfa/src/concurrency/clib/cfathread.cfa
===================================================================
--- libcfa/src/concurrency/clib/cfathread.cfa	(revision 4d35bc646412c0083340d4bbc2fd4f18074da5d3)
+++ libcfa/src/concurrency/clib/cfathread.cfa	(revision fbdfcd83585b2a3ef34770330c0628c3911372df)
@@ -16,4 +16,8 @@
 // #define EPOLL_FOR_SOCKETS
 
+#include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG
+#include <string.h>
+#include <errno.h>
+
 #include "fstream.hfa"
 #include "locks.hfa"
@@ -25,9 +29,4 @@
 
 #include "cfathread.h"
-
-extern "C" {
-		#include <string.h>
-		#include <errno.h>
-}
 
 extern void ?{}(processor &, const char[], cluster &, thread$ *);
@@ -471,11 +470,9 @@
 }
 
+#include <unistd.h>
+
 #include <iofwd.hfa>
 
 extern "C" {
-	#include <unistd.h>
-	#include <sys/types.h>
-	#include <sys/socket.h>
-
 	//--------------------
 	// IO operations
@@ -487,5 +484,5 @@
 		, protocol);
 	}
-	int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len) {
+	int cfathread_bind(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len) {
 		return bind(socket, address, address_len);
 	}
@@ -495,5 +492,5 @@
 	}
 
-	int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) {
+	int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t *restrict address_len) {
 		#if defined(EPOLL_FOR_SOCKETS)
 			int ret;
@@ -512,5 +509,5 @@
 	}
 
-	int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len) {
+	int cfathread_connect(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len) {
 		#if defined(EPOLL_FOR_SOCKETS)
 			int ret;
Index: libcfa/src/concurrency/clib/cfathread.h
===================================================================
--- libcfa/src/concurrency/clib/cfathread.h	(revision 4d35bc646412c0083340d4bbc2fd4f18074da5d3)
+++ libcfa/src/concurrency/clib/cfathread.h	(revision fbdfcd83585b2a3ef34770330c0628c3911372df)
@@ -9,17 +9,16 @@
 // Author           : Thierry Delisle
 // Created On       : Tue Sep 22 15:31:20 2020
-// Last Modified By :
-// Last Modified On :
-// Update Count     :
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Feb 16 12:00:32 2023
+// Update Count     : 5
 //
 
 #if defined(__cforall) || defined(__cplusplus)
+#include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG
+#include <unistd.h>
+#include <errno.h>
+
 extern "C" {
 #endif
-	#include <asm/types.h>
-	#include <errno.h>
-	#include <unistd.h>
-
-
 	//--------------------
 	// Basic types
@@ -73,5 +72,5 @@
 	} cfathread_mutexattr_t;
 	typedef struct cfathread_mutex * cfathread_mutex_t;
-	int cfathread_mutex_init(cfathread_mutex_t *restrict mut, const cfathread_mutexattr_t *restrict attr) __attribute__((nonnull (1)));
+	int cfathread_mutex_init(cfathread_mutex_t * restrict mut, const cfathread_mutexattr_t * restrict attr) __attribute__((nonnull (1)));
 	int cfathread_mutex_destroy(cfathread_mutex_t *mut) __attribute__((nonnull (1)));
 	int cfathread_mutex_lock(cfathread_mutex_t *mut) __attribute__((nonnull (1)));
@@ -91,11 +90,9 @@
 	//--------------------
 	// IO operations
-	struct sockaddr;
-	struct msghdr;
 	int cfathread_socket(int domain, int type, int protocol);
-	int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len);
+	int cfathread_bind(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len);
 	int cfathread_listen(int socket, int backlog);
-	int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len);
-	int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len);
+	int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t * restrict address_len);
+	int cfathread_connect(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len);
 	int cfathread_dup(int fildes);
 	int cfathread_close(int fildes);
