Index: roard/include/roard.h
===================================================================
--- roard/include/roard.h	(revision 1482)
+++ roard/include/roard.h	(revision 1494)
@@ -78,5 +78,7 @@
 
 int alive;
+#ifdef ROAR_SUPPORT_LISTEN
 int g_no_listen;
+#endif
 
 uint32_t g_pos; // current possition in output stream
@@ -93,5 +95,7 @@
 void on_sig_chld (int signum);
 
+#ifdef ROAR_SUPPORT_LISTEN
 int g_listen_socket;
+#endif
 
 int g_self_client;
Index: roard/loop.c
===================================================================
--- roard/loop.c	(revision 1488)
+++ roard/loop.c	(revision 1494)
@@ -58,11 +58,17 @@
   ROAR_DBG("main_loop(*): looping...");
 
+#ifdef ROAR_SUPPORT_LISTEN
   if ( g_listen_socket != -1 ) {
    ROAR_DBG("main_loop(*): check for new clients...");
    net_check_listen();
   }
+#endif
 
   ROAR_DBG("main_loop(*): check for new data...");
+#ifdef ROAR_SUPPORT_LISTEN
   if ( clients_check_all() == 0 && g_terminate && g_listen_socket == -1 ) {
+#else
+  if ( clients_check_all() == 0 && g_terminate ) {
+#endif
    term  = 1;
   }
Index: roard/network.c
===================================================================
--- roard/network.c	(revision 1484)
+++ roard/network.c	(revision 1494)
@@ -24,4 +24,6 @@
 
 #include "roard.h"
+
+#ifdef ROAR_SUPPORT_LISTEN
 
 #ifdef ROAR_BROKEN_PEERCRED
@@ -110,3 +112,5 @@
 #endif
 
+#endif
+
 //ll
Index: roard/roard.c
===================================================================
--- roard/roard.c	(revision 1486)
+++ roard/roard.c	(revision 1494)
@@ -25,5 +25,7 @@
 #include "roard.h"
 
+#ifdef ROAR_SUPPORT_LISTEN
 char * server = ROAR_DEFAULT_SOCK_GLOBAL; // global server address
+#endif
 
 void usage (void) {
@@ -270,5 +272,7 @@
  int i;
  char * k;
+#ifdef ROAR_SUPPORT_LISTEN
  char user_sock[80]  = {0};
+#endif
  struct roar_audio_info sa;
 #ifdef ROAR_HAVE_FORK
@@ -281,5 +285,7 @@
  char * opts      = NULL;
 // char * server = ROAR_DEFAULT_SOCK_GLOBAL;
+#ifdef ROAR_SUPPORT_LISTEN
  int      port    = ROAR_DEFAULT_PORT;
+#endif
  int               drvid;
  char * s_drv     = "cf";
@@ -295,5 +301,7 @@
  char * sock_grp  = ROAR_DEFAULT_SOCKGRP;
  char * sock_user = NULL;
+#ifdef ROAR_SUPPORT_LISTEN
  int    sock_type = ROAR_SOCKET_TYPE_UNKNOWN;
+#endif
 #ifdef ROAR_HAVE_CHROOT
  char * chrootdir = NULL;
@@ -320,9 +328,13 @@
 #endif
 
- g_listen_socket = -1;
  g_standby       =  0;
  g_autostandby   =  0;
  alive           =  1;
+#ifdef ROAR_SUPPORT_LISTEN
  g_no_listen     =  0;
+ g_listen_socket = -1;
+#else
+ g_terminate     =  1;
+#endif
 
  sa.bits     = ROAR_BITS_DEFAULT;
@@ -334,4 +346,5 @@
 
 
+#ifdef ROAR_SUPPORT_LISTEN
  if ( getuid() != 0 && getenv("HOME") != NULL ) {
   snprintf(user_sock, 79, "%s/%s", (char*)getenv("HOME"), ROAR_DEFAULT_SOCK_USER);
@@ -341,4 +354,5 @@
  if ( getenv("ROAR_SERVER") != NULL )
   server = getenv("ROAR_SERVER");
+#endif
 
  if ( clients_init() == -1 ) {
@@ -375,7 +389,11 @@
 
   } else if ( strcmp(k, "--restart") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
    if ( restart_server(server) == -1 ) {
     ROAR_WARN("Can not terminate old server (not running at %s?), tring to continue anyway", server);
    }
+#else
+   ROAR_ERR("--restart not supported");
+#endif
 
   } else if ( strcmp(k, "--demon") == 0 || strcmp(k, "--daemon") == 0 ) {
@@ -472,4 +490,5 @@
   } else if ( strcmp(k, "-p") == 0 || strcmp(k, "--port") == 0 ) {
    // This is only usefull in INET not UNIX mode.
+#ifdef ROAR_SUPPORT_LISTEN
    if ( *server == '/' )
     server = ROAR_DEFAULT_HOST;
@@ -491,8 +510,12 @@
 #endif
    }
+#endif
   } else if ( strcmp(k, "-b") == 0 || strcmp(k, "--bind") == 0 || strcmp(k, "--sock") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
    server = argv[++i];
+#endif
 
   } else if ( strcmp(k, "-t") == 0 || strcmp(k, "--tcp") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
    if ( sock_type != ROAR_SOCKET_TYPE_TCP && sock_type != ROAR_SOCKET_TYPE_TCP6 )
     sock_type = ROAR_SOCKET_TYPE_TCP;
@@ -500,10 +523,14 @@
    if ( *server == '/' )
     server = ROAR_DEFAULT_HOST;
+#endif
 
   } else if ( strcmp(k, "-4") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
    sock_type = ROAR_SOCKET_TYPE_TCP;
    if ( *server == '/' )
     server = ROAR_DEFAULT_HOST;
+#endif
   } else if ( strcmp(k, "-6") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
 #ifdef PF_INET6
    sock_type = ROAR_SOCKET_TYPE_TCP6;
@@ -514,10 +541,14 @@
     return 1;
 #endif
+#endif
 
   } else if ( strcmp(k, "-u") == 0 || strcmp(k, "--unix") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
    // ignore this case as it is the default behavor.
    sock_type = ROAR_SOCKET_TYPE_UNIX;
+#endif
 
   } else if ( strcmp(k, "-n") == 0 || strcmp(k, "--decnet") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
 #ifdef ROAR_HAVE_LIBDNET
     port   = ROAR_DEFAULT_NUM;
@@ -529,4 +560,5 @@
     return 1;
 #endif
+#endif
 
   } else if ( strcmp(k, "-G") == 0 ) {
@@ -536,7 +568,9 @@
 
   } else if ( strcmp(k, "--no-listen") == 0 ) {
+#ifdef ROAR_SUPPORT_LISTEN
    *server     = 0;
    g_terminate = 1;
    g_no_listen = 1;
+#endif
   } else if ( strcmp(k, "--client-fh") == 0 ) {
    if ( clients_set_fh(clients_new(), atoi(argv[++i])) == -1 ) {
@@ -576,4 +610,5 @@
   ROAR_ERR("Can not initialize MIDI subsystem");
 
+#ifdef ROAR_SUPPORT_LISTEN
  if ( *server != 0 ) {
   if ( (g_listen_socket = roar_socket_listen(sock_type, server, port)) == -1 ) {
@@ -635,4 +670,5 @@
 #endif
  }
+#endif
 
  if ( output_buffer_init(&sa) == -1 ) {
@@ -759,4 +795,5 @@
 void cleanup_listen_socket (int terminate) {
 
+#ifdef ROAR_SUPPORT_LISTEN
  if ( g_listen_socket != -1 ) {
 #ifdef ROAR_HAVE_IO_POSIX
@@ -771,4 +808,6 @@
 #endif
  }
+
+#endif
 
  if ( terminate )
