]> git.pld-linux.org Git - packages/libtirpc.git/commitdiff
- A couple ntohs() were needed in bindresvport_sa()
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 8 May 2007 11:50:12 +0000 (11:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    libtirpc-ntohs.patch -> 1.1

libtirpc-ntohs.patch [new file with mode: 0644]

diff --git a/libtirpc-ntohs.patch b/libtirpc-ntohs.patch
new file mode 100644 (file)
index 0000000..3b0085b
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/src/bindresvport.c b/src/bindresvport.c
+index bc75d29..6aac03c 100644
+--- a/src/bindresvport.c
++++ b/src/bindresvport.c
+@@ -101,14 +101,14 @@ bindresvport_sa(sd, sa)
+         case AF_INET:
+               sin = (struct sockaddr_in *)sa;
+                 salen = sizeof(struct sockaddr_in);
+-                port = sin->sin_port;
++                port = ntohs(sin->sin_port);
+               portp = &sin->sin_port;
+               break;
+ #ifdef INET6
+         case AF_INET6:
+               sin6 = (struct sockaddr_in6 *)sa;
+                 salen = sizeof(struct sockaddr_in6);
+-                port = sin6->sin6_port;
++                port = ntohs(sin6->sin6_port);
+                 portp = &sin6->sin6_port;
+                 break;
+ #endif
This page took 0.143504 seconds and 4 git commands to generate.