| 774 * you need to call accept() when it's connected. returns your fd |
777 * you need to call accept() when it's connected. returns your fd |
| 775 * |
778 * |
| 776 */ |
779 */ |
| 777 static int listenestablish(fu16_t portnum) |
780 static int listenestablish(fu16_t portnum) |
| 778 { |
781 { |
| 779 #if defined(__linux__) |
782 #if HAVE_GETADDRINFO |
| 780 /* XXX what other OS's support getaddrinfo? */ |
|
| 781 int listenfd; |
783 int listenfd; |
| 782 const int on = 1; |
784 const int on = 1; |
| 783 struct addrinfo hints, *res, *ressave; |
785 struct addrinfo hints, *res, *ressave; |
| 784 char serv[5]; |
786 char serv[5]; |
| 785 |
787 |