]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/gsocket.cpp
adapting comment to new implementation
[wxWidgets.git] / src / unix / gsocket.cpp
index 829893896343af6a6667f4ea8e9ea1ae26dfc4c1..d417f12da8bf8a6d2f1250ae711affc5c9a3ce93 100644 (file)
 #include <types.h>
 #include <netinet/in.h>
 #endif
+#ifdef __NETBSD__
+#ifndef _NETBSD_SOURCE
+#define _NETBSD_SOURCE
+#endif
+#ifndef _LIBC
+#define _LIBC
+#endif
+#endif
 #include <netdb.h>
 #include <sys/ioctl.h>
 
@@ -235,7 +243,7 @@ struct hostent * wxGethostbyname_r(const char *hostname, struct hostent *h,
                                   void *buffer, int size, int *err)
 
 {
-  struct hostent *he;
+  struct hostent *he = NULL;
   *err = 0;
 #if defined(HAVE_FUNC_GETHOSTBYNAME_R_6)
   if (gethostbyname_r(hostname, h, (char*)buffer, size, &he, err))
@@ -268,7 +276,7 @@ struct hostent * wxGethostbyaddr_r(const char *addr_buf, int buf_size,
                                   int proto, struct hostent *h,
                                   void *buffer, int size, int *err)
 {
-  struct hostent *he;
+  struct hostent *he = NULL;
   *err = 0;
 #if defined(HAVE_FUNC_GETHOSTBYNAME_R_6)
   if (gethostbyaddr_r(addr_buf, buf_size, proto, h,
@@ -338,7 +346,7 @@ static struct servent * deepCopyServent(struct servent *s,
 struct servent *wxGetservbyname_r(const char *port, const char *protocol,
                                  struct servent *serv, void *buffer, int size)
 {
-  struct servent *se;
+  struct servent *se = NULL;
 #if defined(HAVE_FUNC_GETSERVBYNAME_R_6)
   if (getservbyname_r(port, protocol, serv, (char*)buffer, size, &se))
     se = NULL;