From 9cc6060db7a42da4f416b9bfed3a7235adc7ea97 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 21 Feb 1996 17:11:13 +0000 Subject: [PATCH] (main): Convert port to network byte order. --- lib-src/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-src/tcp.c b/lib-src/tcp.c index 6bcaab478ac..5741b52d132 100644 --- a/lib-src/tcp.c +++ b/lib-src/tcp.c @@ -122,7 +122,7 @@ main (argc, argv) bzero (&sockin, sizeof (sockin)); sockin.sin_family = host->h_addrtype; bcopy (host->h_addr, &sockin.sin_addr, host->h_length); - sockin.sin_port = port; + sockin.sin_port = htons (port); if ((server = socket (AF_INET, SOCK_STREAM, 0)) < 0) { perror ("socket"); -- 2.39.2