chiark / gitweb /
Fix check_loopback()
[elogind.git] / src / core / loopback-setup.c
index 98fc04dd2e93e67c799359e4844d1efa7e02acd4..ab6335c0ceb576198b03630ac7288b90dae25dd7 100644 (file)
@@ -64,7 +64,7 @@ static int check_loopback(void) {
                 struct sockaddr_in in;
         } sa = {
                 .in.sin_family = AF_INET,
-                .in.sin_addr.s_addr = INADDR_LOOPBACK,
+                .in.sin_addr.s_addr = htonl(INADDR_LOOPBACK),
         };
 
         /* If we failed to set up the loop back device, check whether