summaryrefslogtreecommitdiff
path: root/lib-src/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/tcp.c')
-rw-r--r--lib-src/tcp.c2
1 files changed, 1 insertions, 1 deletions
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");