Try to make indent formatting less horrible
[oweals/busybox.git] / sysklogd / klogd.c
index b76a52ff71f796c2b965a0e374bd946829adc692..c132e065cc4058c23c0924cd9a5afbf7a10e5b55 100644 (file)
@@ -6,8 +6,7 @@
  * Changes: Made this a standalone busybox module which uses standalone
  *                                     syslog() client interface.
  *
- * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
- * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
+ * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
  *
  * Copyright (C) 2000 by Karl M. Hegbloom <karlheg@debian.org>
  *
 #include <unistd.h>
 #include <ctype.h>
 #include <sys/syslog.h>
-
-#if __GNU_LIBRARY__ < 5
-# ifdef __alpha__
-#   define klogctl syslog
-# endif
-#else
-# include <sys/klog.h>
-#endif
+#include <sys/klog.h>
 
 #include "busybox.h"
 
@@ -155,11 +147,10 @@ extern int klogd_main(int argc, char **argv)
        }
 
        if (doFork) {
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
                if (daemon(0, 1) < 0)
                        bb_perror_msg_and_die("daemon");
-#else
-               bb_error_msg_and_die("daemon not supported");
+#if defined(__uClinux__)
+               vfork_daemon_rexec(argc, argv, "-n");
 #endif
        }
        doKlogd(console_log_level);