Header cleanup on two more networking files (move libbb.h to the top and
[oweals/busybox.git] / miscutils / crond.c
index 9b194d13a7b2c0840566f8732363452587c4c3ee..3f60468de48e251aff73226c152ec586de1d3732 100644 (file)
@@ -12,6 +12,7 @@
 
 #define VERSION "2.3.2"
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -29,8 +30,6 @@
 #include <sys/stat.h>
 #include <sys/resource.h>
 
-#include "busybox.h"
-
 #define arysize(ary)    (sizeof(ary)/sizeof((ary)[0]))
 
 #ifndef CRONTABS
@@ -205,12 +204,12 @@ int crond_main(int ac, char **av)
         */
 
        if (!(opt & 4)) {
-#if defined(__uClinux__)
+#ifdef BB_NOMMU
                /* reexec for vfork() do continue parent */
                vfork_daemon_rexec(1, 0, ac, av, "-f");
-#else                                                  /* uClinux */
+#else
                bb_xdaemon(1, 0);
-#endif                                                 /* uClinux */
+#endif
        }
 
        (void) startlogger();   /* need if syslog mode selected */
@@ -283,21 +282,6 @@ int crond_main(int ac, char **av)
        bb_fflush_stdout_and_exit(EXIT_SUCCESS); /* not reached */
 }
 
-#if ENABLE_DEBUG_CROND_OPTION || ENABLE_FEATURE_CROND_CALL_SENDMAIL
-/*
-    write to temp file..
-*/
-static void fdprintf(int fd, const char *ctl, ...)
-{
-       va_list va;
-
-       va_start(va, ctl);
-       vdprintf(fd, ctl, va);
-       va_end(va);
-}
-#endif
-
-
 static int ChangeUser(const char *user)
 {
        struct passwd *pas;