netcat needs poll.h portability goop

This commit is contained in:
Damien Miller 2015-03-04 00:55:48 -08:00
parent dad2b1892b
commit a05adf95d2
1 changed files with 8 additions and 1 deletions

View File

@ -46,7 +46,6 @@
#include <errno.h> #include <errno.h>
#include <netdb.h> #include <netdb.h>
#include <poll.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -56,6 +55,14 @@
#include <limits.h> #include <limits.h>
#include "atomicio.h" #include "atomicio.h"
#ifdef HAVE_POLL_H
#include <poll.h>
#else
# ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
# endif
#endif
#ifndef SUN_LEN #ifndef SUN_LEN
#define SUN_LEN(su) \ #define SUN_LEN(su) \
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))