]> code.citadel.org Git - citadel.git/blobdiff - citadel/rcit.c
fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / rcit.c
index 8cd0e4f887d6f75b3f6955d051fa62532719db64..c34b0769343fb8e02ed4d740ac6de1a02c773717 100644 (file)
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-#include <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 "citadel.h"
 
 void get_config(void);
@@ -34,7 +45,7 @@ int main(int argc, char **argv)
 
        get_config();
        sprintf(flnm,"./network/spoolin/rcit.%ld", (long)getpid());
-       sprintf(tname, tmpnam(NULL));
+       strcpy(tname, tmpnam(NULL));
 
        for (a=1; a<argc; ++a) {
                if (!strcmp(argv[a],"-z")) compressed_input = 1;