summaryrefslogtreecommitdiffstats
path: root/x11/gdm/files/patch-common_gdm-address.c
blob: a827d4b6d1b67ddb37d40565a02d03dea33797f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- common/gdm-address.c.orig   2009-02-19 21:45:13.000000000 -0500
+++ common/gdm-address.c    2009-05-11 02:38:17.000000000 -0400
@@ -29,6 +29,8 @@
 #include <stropts.h>
 #endif
 #include <string.h>
+#include <sys/types.h>
+#include <sys/param.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -37,7 +39,6 @@
 #endif
 #include <netdb.h>
 #include <sys/ioctl.h>
-#include <net/if.h>
 
 #ifndef G_OS_WIN32
 #include <sys/select.h>
@@ -47,6 +48,7 @@
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #endif
+#include <net/if.h>
 
 #include <glib-object.h>
 
@@ -206,7 +208,7 @@ gdm_address_get_hostname (GdmAddress *ad
 
         host [0] = '\0';
         res = getnameinfo ((const struct sockaddr *)address->ss,
-                           sizeof (struct sockaddr_storage),
+                           gdm_sockaddr_len (address->ss),
                            host, sizeof (host),
                            NULL, 0,
                            0);
@@ -245,7 +247,7 @@ gdm_address_get_numeric_info (GdmAddress
         host [0] = '\0';
         serv [0] = '\0';
         res = getnameinfo ((const struct sockaddr *)address->ss,
-                           sizeof (struct sockaddr_storage),
+                           gdm_sockaddr_len (address->ss),
                            host, sizeof (host),
                            serv, sizeof (serv),
                            NI_NUMERICHOST | NI_NUMERICSERV);