Merge remote-tracking branch 'gnunet/master' into identity_oidc
[oweals/gnunet.git] / src / gns / w32nsp-resolve.c
index 7c66093eab424b7ed86079d6fec56cb06ef40459..82f15c6ccf61b3f5654d09f905024d7eebefd721 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2012 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2012 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -22,6 +22,9 @@
  * @brief W32 integration for GNS
  * @author LRN
  */
+/* Instead of including gnunet_common.h */
+#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0)
+
 #include <ws2tcpip.h>
 #include <windows.h>
 #include <nspapi.h>
@@ -362,7 +365,7 @@ main (int argc, char **argv)
                 struct hostent *he = malloc (result->lpBlob->cbSize);
                 if (he != NULL)
                 {
-                  memcpy (he, result->lpBlob->pBlobData, result->lpBlob->cbSize);
+                  GNUNET_memcpy (he, result->lpBlob->pBlobData, result->lpBlob->cbSize);
                   UnpackHostEnt (he);
                   print_hostent (he);
                   free (he);