Ticket #7181: patch-proto.c

File patch-proto.c, 578 bytes (added by andre@…, 19 years ago)

patch-proto.c

Line 
1--- src/proto.c 2005-12-07 08:14:05.000000000 -0800
2+++ src/proto.c 2006-02-10 14:48:56.000000000 -0800
3@@ -33,6 +33,7 @@
4 
5 #include "cf.defs.h"
6 #include "cf.extern.h"
7+#include "netinet/in.h"
8 
9 /*********************************************************************/
10 
11@@ -120,8 +121,8 @@
12   
13 #else
14   
15-   iaddr = &(myaddr.sin_addr); 
16-   hp = gethostbyaddr((void *)iaddr,sizeof(myaddr.sin_addr),family);
17+   iaddr = &(myaddr.sin6_addr); 
18+   hp = gethostbyaddr((void *)iaddr,sizeof(myaddr.sin6_addr),family);
19   
20    if ((hp == NULL) || (hp->h_name == NULL))
21       {