--- zaptel/zaptel.c.orig	2007-01-26 09:51:48.000000000 +0100
+++ zaptel/zaptel.c	2007-11-15 00:44:21.000000000 +0100
@@ -254,7 +254,7 @@
         while (1) {
                 if (kthread_must_exit) {
                         wakeup(cookie);
-                        kthread_exit(0);
+                        kproc_exit(0);
                 }
 
                 ZAP_LOCK(toselwakeup_lock);
@@ -1254,7 +1254,7 @@
 		ZAP_LOCK_INIT(toselwakeup_lock, "toselwakeup_lock");
 
 	        kthread_must_exit = 0;
-		if (kthread_create(selwakeup_thread_handler, (void *)toselwakeup, &kthread, 0, 0, "zt_selwakeup_thread"))
+		if (kproc_create(selwakeup_thread_handler, (void *)toselwakeup, &kthread, 0, 0, "zt_selwakeup_thread"))
 		{
 			printf("Failed to create kthread\n");
 		}
