Changeset 1395:2e8b8e887220 in roaraudio


Ignore:
Timestamp:
03/25/09 17:01:38 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

only use UNIX or DECnet sockets if they are supported by the OS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/simple.c

    r1380 r1395  
    192192#endif 
    193193 } else if ( type == ROAR_SOCKET_TYPE_DECNET ) { 
     194#ifdef ROAR_HAVE_LIBDNET 
    194195  len = sizeof(struct sockaddr_in); 
    195196  setsockopt(listen, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int)); 
     197#else 
     198  return -1; 
     199#endif 
    196200 } 
    197201 
     
    237241  close(listen); 
    238242 } else { // this is type == ROAR_SOCKET_TYPE_UNIX 
     243#ifdef ROAR_HAVE_UNIX 
    239244  if ( socketpair(AF_UNIX, SOCK_STREAM, 0, socks) == -1 ) { 
    240245   roar_kick(con, ROAR_OT_STREAM, s->id); // we do not need to check for errors 
     
    251256  close(socks[0]); 
    252257  fh = socks[1]; 
     258#else 
     259  roar_kick(con, ROAR_OT_STREAM, s->id); 
     260  return -1; 
     261#endif 
    253262 } 
    254263 
Note: See TracChangeset for help on using the changeset viewer.