]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_inetcfg.c
fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / serv_inetcfg.c
index bedcd965d01e320a2bb90fe489be08bb822c86cd..c9dbd2d7af5ba9f7e9e8d54468bed59b70dec240 100644 (file)
 #include <pwd.h>
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #include <sys/wait.h>
 #include <string.h>
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include <time.h>
 #include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
@@ -41,7 +51,7 @@
 
 void inetcfg_setTo(struct CtdlMessage *msg) {
        char *conf;
-       char buf[256];
+       char buf[SIZ];
 
        if (msg->cm_fields['M']==NULL) return;
        conf = strdoop(msg->cm_fields['M']);