* Licensed under GPL v2 or later, see file License for details.
*/
-//#include <sys/socket.h>
-//#include <netinet/in.h>
-//#include <netdb.h>
-//#include <signal.h>
-
-#include "busybox.h"
-
+#include "libbb.h"
enum { RFC_868_BIAS = 2208988800UL };
-static void socket_timeout(int sig)
+static void socket_timeout(int sig UNUSED_PARAM)
{
bb_error_msg_and_die("timeout connecting to time server");
}
return ntohl(nett) - RFC_868_BIAS;
}
-int rdate_main(int argc, char **argv)
+int rdate_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int rdate_main(int argc UNUSED_PARAM, char **argv)
{
time_t remote_time;
unsigned long flags;
opt_complementary = "-1";
- flags = getopt32(argc, argv, "sp");
+ flags = getopt32(argv, "sp");
remote_time = askremotedate(argv[optind]);