#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
+#include <errno.h>
+#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sendfile.h>
}
close(sd[1]), close(infd), close(outfd);
- sprintf(cmd, "cmp %s %s\n", sfile, tfile);
+ snprintf(cmd, sizeof(cmd), "cmp %s %s\n", sfile, tfile);
return system(cmd);
}