[BusyBox] compile error: rdate and bb_lookup_port

Stephane Billiart stephane at reefedge.com
Sun Jan 18 14:38:02 UTC 2004


bb_lookup_port now takes 3 parameters but rdate has not been modified
accordingly and fails to compile in the current CVS version.
The modification below fixes the problem.

--- util-linux/rdate.c.orig	Sun Jan 18 09:23:08 2004
+++ util-linux/rdate.c	Sun Jan 18 09:23:31 2004
@@ -51,7 +51,7 @@
 	int fd;
 
 	bb_lookup_host(&s_in, host);
-	s_in.sin_port = bb_lookup_port("time", 37);
+	s_in.sin_port = bb_lookup_port("time", "tcp", 37);
 
 	/* Add a timeout for dead or non accessable servers */
 	alarm(10);

Now, RFC868 allows both UDP and TCP implementations of the time protocol
so this may not work if someone defines a udp time service other than 37
but who would do that?

-- 
Stéphane



More information about the busybox mailing list