summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-02-21 17:11:13 +0000
committerKarl Heuer <kwzh@gnu.org>1996-02-21 17:11:13 +0000
commit2a728c62362d7c20ff99ab351b9b0a17049b0acd (patch)
tree1a04de783e0712f09c0367125b77ddcf34d7fad4 /lib-src
parent1737aa49eb95e892a6d0a8d74574ec344699960e (diff)
downloademacs-2a728c62362d7c20ff99ab351b9b0a17049b0acd.tar.gz
(main): Convert port to network byte order.
Diffstat (limited to 'lib-src')
-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");