summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-daemon')
-rw-r--r--src/libsystemd/sd-daemon/sd-daemon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c
index 4da9dbfd63..b20a7ebb4c 100644
--- a/src/libsystemd/sd-daemon/sd-daemon.c
+++ b/src/libsystemd/sd-daemon/sd-daemon.c
@@ -310,12 +310,12 @@ _public_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint
if (l < sizeof(struct sockaddr_in))
return -EINVAL;
- return htons(port) == sockaddr.in.sin_port;
+ return htobe16(port) == sockaddr.in.sin_port;
} else {
if (l < sizeof(struct sockaddr_in6))
return -EINVAL;
- return htons(port) == sockaddr.in6.sin6_port;
+ return htobe16(port) == sockaddr.in6.sin6_port;
}
}