Index: libcfa/src/concurrency/clib/cfathread.cfa
===================================================================
--- libcfa/src/concurrency/clib/cfathread.cfa	(revision ea837e94ae2375e430de2e4c6baa4ceeda949935)
+++ libcfa/src/concurrency/clib/cfathread.cfa	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -105,5 +105,5 @@
 	//--------------------
 	// Thread
-	int cfathread_create( cfathread_t * handle, cfathread_attr_t * attr, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1))) {
+	int cfathread_create( cfathread_t * handle, const cfathread_attr_t * attr, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1))) {
 		cluster * cl = attr ? attr->cl : active_cluster();
 		cfathread_t thrd = alloc();
@@ -120,4 +120,8 @@
 		}
 		return 0;
+	}
+
+	int cfathread_get_errno(void) {
+		return errno;
 	}
 
Index: libcfa/src/concurrency/clib/cfathread.h
===================================================================
--- libcfa/src/concurrency/clib/cfathread.h	(revision ea837e94ae2375e430de2e4c6baa4ceeda949935)
+++ libcfa/src/concurrency/clib/cfathread.h	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -30,5 +30,5 @@
 	typedef struct cluster * cfathread_cluster_t;
 
-	int cfathread_cluster_create(cfathread_cluster_t * cluster) __attribute__((nonnull(1)));
+	int cfathread_cluster_create(cfathread_cluster_t * cluster);
 	cfathread_cluster_t cfathread_cluster_self(void);
 	int cfathread_cluster_add_worker(cfathread_cluster_t cluster, pthread_t* tid, void (*init_routine) (void *), void * arg);
@@ -43,7 +43,10 @@
 
 	int cfathread_attr_init(cfathread_attr_t * attr) __attribute__((nonnull (1)));
-	static inline int cfathread_attr_destroy(cfathread_attr_t * attr) __attribute__((nonnull (1))) { return 0; }
-	static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) __attribute__((nonnull (1))) { return 0; }
-	static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) __attribute__((nonnull (1))) { attr->cl = cl; return 0; }
+	static inline int cfathread_attr_destroy(cfathread_attr_t * attr) __attribute__((nonnull (1)));
+	static inline int cfathread_attr_destroy(cfathread_attr_t * attr) { return 0; }
+	static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) __attribute__((nonnull (1)));
+	static inline int cfathread_attr_setbackground(cfathread_attr_t * attr, int background) { return 0; }
+	static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) __attribute__((nonnull (1)));
+	static inline int cfathread_attr_setcluster(cfathread_attr_t * attr, cfathread_cluster_t cl) { attr->cl = cl; return 0; }
 
 	//--------------------
@@ -52,5 +55,5 @@
 	typedef struct cfathread_object * cfathread_t;
 
-	int cfathread_create( cfathread_t * h, cfathread_attr_t * a, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1)));
+	int cfathread_create( cfathread_t * h, const cfathread_attr_t * a, void *(*main)( void * ), void * arg ) __attribute__((nonnull (1)));
 	int cfathread_join( cfathread_t, void ** retval );
 
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision ea837e94ae2375e430de2e4c6baa4ceeda949935)
+++ tests/Makefile.am	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -26,5 +26,5 @@
 archiveerrors=
 
-DEBUG_FLAGS=-debug -O0
+DEBUG_FLAGS=-debug -g -O0
 
 quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
@@ -44,4 +44,5 @@
 	-Wall \
 	-Wno-unused-function \
+	-Wno-psabi \
 	-quiet @CFA_FLAGS@
 
Index: tests/include/.expect/includes.nast.txt
===================================================================
--- tests/include/.expect/includes.nast.txt	(revision ea837e94ae2375e430de2e4c6baa4ceeda949935)
+++ tests/include/.expect/includes.nast.txt	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -1,4 +1,2 @@
-/usr/include/x86_64-linux-gnu/bits/socket.h: In function '_X16_operator_assignFS7cmsghdr_S7cmsghdrS7cmsghdr_autogen___1':
-/usr/include/x86_64-linux-gnu/bits/socket.h:285:44: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
 include/includes.cfa: In function '_X4mainFi_iPPKc__1':
-include/includes.cfa:154:9: note: #pragma message: Compiled
+include/includes.cfa:156:9: note: #pragma message: Compiled
Index: tests/include/includes.cfa
===================================================================
--- tests/include/includes.cfa	(revision ea837e94ae2375e430de2e4c6baa4ceeda949935)
+++ tests/include/includes.cfa	(revision 05d02c69c8e5526091e4232b523b72f3084c2891)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// includes.cfa -- 
+// includes.cfa --
 //
 // Author           : Peter A. Buhr
@@ -90,5 +90,4 @@
 #include <poll.h>
 #include <printf.h>
-#include <proc_service.h>
 #include <pthread.h>
 #include <pty.h>
@@ -122,5 +121,5 @@
 #include <termio.h>
 #include <termios.h>
-#include <term_entry.h>
+// #include <term_entry.h>								// conflicts with search.h on some machines
 #include <tgmath.h>
 //#include <threads.h>									// does not exist
@@ -137,5 +136,8 @@
 #include <utmpx.h>
 #include <values.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattributes"
 #include <wait.h>
+#pragma GCC diagnostic pop
 #include <wchar.h>
 #include <wctype.h>
