linamh/net-ftp/oftpd/files/oftpd-0.3.7-htons.patch
Mario Fetka f3987e65cf Bump
2020-01-23 11:57:54 +01:00

17 lines
458 B
Diff

--- oftpd-0.3.7/src/ftp_listener.c
+++ oftpd-0.3.7/src/ftp_listener.c
@@ -159,11 +159,11 @@
switch (family) {
#ifdef INET6
case AF_INET6:
- ((struct sockaddr_in6*)&sock_addr)->sin6_port = port;
+ ((struct sockaddr_in6*)&sock_addr)->sin6_port = htons(port);
break;
#endif
case AF_INET:
- ((struct sockaddr_in*)&sock_addr)->sin_port = port;
+ ((struct sockaddr_in*)&sock_addr)->sin_port = htons(port);
break;
default:
/* handle error */