Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision aafed151536405cdb1390b88b7e4ac7c285dd53e)
+++ kernel/generic/src/proc/thread.c	(revision d3145715f4928ba664dc22786d6e0add62328cb0)
@@ -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);
 		}
