inetd: comment tweak. no code changes
[oweals/busybox.git] / coreutils / hostid.c
index 0c11ca385f7d86a18a5b1ba2f35148bca2335247..2794510a7969e316ef3281a971f0c55ba937371a 100644 (file)
@@ -9,17 +9,18 @@
 
 /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
 
-#include <stdlib.h>
-#include <unistd.h>
-#include "busybox.h"
+#include "libbb.h"
 
-extern int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
+/* This is a NOFORK applet. Be very careful! */
+
+int hostid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int hostid_main(int argc, char **argv UNUSED_PARAM)
 {
        if (argc > 1) {
                bb_show_usage();
        }
 
-       bb_printf("%lx\n", gethostid());
+       printf("%lx\n", gethostid());
 
-       bb_fflush_stdout_and_exit(EXIT_SUCCESS);
+       return fflush(stdout);
 }