INN commit: trunk (5 files)

INN Commit rra at isc.org
Mon Dec 1 21:08:29 UTC 2014


    Date: Monday, December 1, 2014 @ 13:08:28
  Author: iulius
Revision: 9754

Windows doesn't have sys/time.h and defines struct timeval in
time.h.  Conditionalize the inclusion of sys/time.h for Windows
and add an include of time.h where it was missing.

Modified:
  trunk/contrib/newsresp.c
  trunk/lib/dbz.c
  trunk/lib/fdlimit.c
  trunk/lib/resource.c
  trunk/tests/innd/chan-t.c

---------------------+
 contrib/newsresp.c  |    1 +
 lib/dbz.c           |    5 ++++-
 lib/fdlimit.c       |    1 +
 lib/resource.c      |    5 ++++-
 tests/innd/chan-t.c |    5 ++++-
 5 files changed, 14 insertions(+), 3 deletions(-)

Modified: contrib/newsresp.c
===================================================================
--- contrib/newsresp.c	2014-12-01 20:26:38 UTC (rev 9753)
+++ contrib/newsresp.c	2014-12-01 21:08:28 UTC (rev 9754)
@@ -72,6 +72,7 @@
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
 #endif
+#include <time.h>
 
 #define NNTPPORT 119
 

Modified: lib/dbz.c
===================================================================
--- lib/dbz.c	2014-12-01 20:26:38 UTC (rev 9753)
+++ lib/dbz.c	2014-12-01 21:08:28 UTC (rev 9754)
@@ -75,7 +75,10 @@
 #include <fcntl.h>
 #include <netinet/in.h>
 #include <sys/stat.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
 
 #include "inn/dbz.h"
 #include "inn/fdflag.h"

Modified: lib/fdlimit.c
===================================================================
--- lib/fdlimit.c	2014-12-01 20:26:38 UTC (rev 9753)
+++ lib/fdlimit.c	2014-12-01 21:08:28 UTC (rev 9754)
@@ -30,6 +30,7 @@
 # if HAVE_SYS_TIME_H
 #  include <sys/time.h>
 # endif
+# include <time.h>
 # include <sys/resource.h>
 #endif
 

Modified: lib/resource.c
===================================================================
--- lib/resource.c	2014-12-01 20:26:38 UTC (rev 9753)
+++ lib/resource.c	2014-12-01 21:08:28 UTC (rev 9754)
@@ -8,7 +8,10 @@
 
 #ifdef HAVE_GETRUSAGE
 
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
 #include <sys/resource.h>
 
 #define TIMEVALasDOUBLE(t)	\

Modified: tests/innd/chan-t.c
===================================================================
--- tests/innd/chan-t.c	2014-12-01 20:26:38 UTC (rev 9753)
+++ tests/innd/chan-t.c	2014-12-01 21:08:28 UTC (rev 9754)
@@ -4,7 +4,10 @@
 #include "config.h"
 #include "clibrary.h"
 #include <fcntl.h>
-#include <sys/time.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
 
 #include "inn/buffer.h"
 #include "inn/innconf.h"



More information about the inn-committers mailing list