summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-15 01:26:01 +0200
committerDaniel Mack <github@zonque.org>2016-06-15 01:26:01 +0200
commit8e38570ebed346c00e58c3fcc998a4b305e83a36 (patch)
treee1c56e0c9b1ff621fb53cd98f48649f3fd999119 /src/libsystemd
parent69281c49eb824b2cc854fdb5b97f134b1371be8d (diff)
tree-wide: htonl() is weird, let's use htobe32() instead (#3538)
Super-important change, yeah!
Diffstat (limited to 'src/libsystemd')
-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;
}
}