text: #include <errno.h>
  #include <netdb.h>
  #include <string.h>
  #include <arpa/inet.h>
  #include <sys/socket.h>
  #include <sys/types.h>
  #include "uiciname.h"
  
  int u_accept(int fd, char *hostn, int hostnsize) { 
     int len = sizeof(struct sockaddr);
     struct sockaddr_in netclient;
     int retval;
  
     while (((retval =
             accept(fd, (struct sockaddr *)(&netclient), &len)) == -1) &&
            (errno == EINTR))
        ;  
     if ((retval == -1) || (hostn == NULL) || (hostnsize <= 0))
        return retval;
     addr2name(netclient.sin_addr, hostn, hostnsize);
     return retval;
  }
  