io.c: <sys/time.h> is only needed when using select()
authorAlexander Barton <alex@barton.de>
Sun, 16 Mar 2014 23:45:07 +0000 (00:45 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 16 Mar 2014 23:45:07 +0000 (00:45 +0100)
Only include the <sys/time.h> header when using the select() IO API,
it isn't required otherwise.

src/ngircd/io.c

index dab3043983364e6997effff4055eab9c8a1400a9..791190fed8fee134eca794d5b75e1876f6b9d7ba 100644 (file)
@@ -18,7 +18,6 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/time.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -119,6 +118,7 @@ static bool io_event_change_devpoll(int fd, short what);
 #endif
 
 #ifdef IO_USE_SELECT
+#include <sys/time.h>
 #include "defines.h"   /* for conn.h */
 #include "proc.h"      /* for PROC_STAT (needed by conf.h) */
 #include "conn.h"      /* for CONN_ID (needed by conf.h) */