Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision aafed151536405cdb1390b88b7e4ac7c285dd53e)
+++ kernel/generic/src/proc/thread.c	(revision 9e889f6e4cdd51976ec8196b2e70a587d1cb4451)
@@ -48,4 +48,5 @@
 #include <synch/spinlock.h>
 #include <synch/waitq.h>
+#include <synch/syswaitq.h>
 #include <cpu.h>
 #include <str.h>
@@ -520,4 +521,5 @@
 			ipc_cleanup();
 			futex_task_cleanup();
+			sys_waitq_task_cleanup();
 			LOG("Cleanup of task %" PRIu64 " completed.", TASK->taskid);
 		}
