diff --git a/lib/smux.c b/lib/smux.c
index 70be492..03da99f 100644
--- a/lib/smux.c
+++ b/lib/smux.c
@@ -113,7 +113,7 @@
 };
 
 /* thread master */
-static struct thread_master *master;
+static struct thread_master *smux_master;
 
 static int
 oid_compare_part (oid *o1, int o1_len, oid *o2, int o2_len)
@@ -1239,13 +1239,13 @@
   switch (event)
     {
     case SMUX_SCHEDULE:
-      smux_connect_thread = thread_add_event (master, smux_connect, NULL, 0);
+      smux_connect_thread = thread_add_event (smux_master, smux_connect, NULL, 0);
       break;
     case SMUX_CONNECT:
-      smux_connect_thread = thread_add_timer (master, smux_connect, NULL, 10);
+      smux_connect_thread = thread_add_timer (smux_master, smux_connect, NULL, 10);
       break;
     case SMUX_READ:
-      smux_read_thread = thread_add_read (master, smux_read, NULL, sock);
+      smux_read_thread = thread_add_read (smux_master, smux_read, NULL, sock);
       break;
     default:
       break;
@@ -1474,7 +1474,7 @@
 smux_init (struct thread_master *tm)
 {
   /* copy callers thread master */
-  master = tm;
+  smux_master = tm;
   
   /* Make MIB tree. */
   treelist = list_new();
diff --git a/lib/vty.c b/lib/vty.c
index 5c4a23b..8befcb0 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2573,7 +2573,7 @@
 }
 
 /* Master of the threads. */
-static struct thread_master *master;
+static struct thread_master *vty_master;
 
 static void
 vty_event (enum event event, int sock, struct vty *vty)
@@ -2583,23 +2583,23 @@
   switch (event)
     {
     case VTY_SERV:
-      vty_serv_thread = thread_add_read (master, vty_accept, vty, sock);
+      vty_serv_thread = thread_add_read (vty_master, vty_accept, vty, sock);
       vector_set_index (Vvty_serv_thread, sock, vty_serv_thread);
       break;
 #ifdef VTYSH
     case VTYSH_SERV:
-      vty_serv_thread = thread_add_read (master, vtysh_accept, vty, sock);
+      vty_serv_thread = thread_add_read (vty_master, vtysh_accept, vty, sock);
       vector_set_index (Vvty_serv_thread, sock, vty_serv_thread);
       break;
     case VTYSH_READ:
-      vty->t_read = thread_add_read (master, vtysh_read, vty, sock);
+      vty->t_read = thread_add_read (vty_master, vtysh_read, vty, sock);
       break;
     case VTYSH_WRITE:
-      vty->t_write = thread_add_write (master, vtysh_write, vty, sock);
+      vty->t_write = thread_add_write (vty_master, vtysh_write, vty, sock);
       break;
 #endif /* VTYSH */
     case VTY_READ:
-      vty->t_read = thread_add_read (master, vty_read, vty, sock);
+      vty->t_read = thread_add_read (vty_master, vty_read, vty, sock);
 
       /* Time out treatment. */
       if (vty->v_timeout)
@@ -2607,12 +2607,12 @@
 	  if (vty->t_timeout)
 	    thread_cancel (vty->t_timeout);
 	  vty->t_timeout = 
-	    thread_add_timer (master, vty_timeout, vty, vty->v_timeout);
+	    thread_add_timer (vty_master, vty_timeout, vty, vty->v_timeout);
 	}
       break;
     case VTY_WRITE:
       if (! vty->t_write)
-	vty->t_write = thread_add_write (master, vty_flush, vty, sock);
+	vty->t_write = thread_add_write (vty_master, vty_flush, vty, sock);
       break;
     case VTY_TIMEOUT_RESET:
       if (vty->t_timeout)
@@ -2623,7 +2623,7 @@
       if (vty->v_timeout)
 	{
 	  vty->t_timeout = 
-	    thread_add_timer (master, vty_timeout, vty, vty->v_timeout);
+	    thread_add_timer (vty_master, vty_timeout, vty, vty->v_timeout);
 	}
       break;
     }
@@ -3035,7 +3035,7 @@
 
   vtyvec = vector_init (VECTOR_MIN_SIZE);
 
-  master = master_thread;
+  vty_master = master_thread;
 
   atexit (vty_stdio_reset);
 
