From 0eb3848d99441a237ba2a6585a3c054d67f28c53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?utf8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sat, 25 Feb 2017 12:51:51 +0000 Subject: [PATCH] W32: Splice GNUNET_memcpy macro into NAT and GNS helpers Including gnunet_common.h is too bothersome, these programs are designed to be relatively standalone. --- src/gns/w32nsp-resolve.c | 3 +++ src/nat/gnunet-helper-nat-client-windows.c | 2 ++ src/nat/gnunet-helper-nat-server-windows.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/gns/w32nsp-resolve.c b/src/gns/w32nsp-resolve.c index 1de1a3657..82f15c6cc 100644 --- a/src/gns/w32nsp-resolve.c +++ b/src/gns/w32nsp-resolve.c @@ -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 #include #include diff --git a/src/nat/gnunet-helper-nat-client-windows.c b/src/nat/gnunet-helper-nat-client-windows.c index 89dad9e7b..622f8c961 100644 --- a/src/nat/gnunet-helper-nat-client-windows.c +++ b/src/nat/gnunet-helper-nat-client-windows.c @@ -42,6 +42,8 @@ * - Nathan Evans */ #define _GNU_SOURCE +/* Instead of including gnunet_common.h */ +#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0) #define FD_SETSIZE 1024 #include diff --git a/src/nat/gnunet-helper-nat-server-windows.c b/src/nat/gnunet-helper-nat-server-windows.c index c8e1193e4..09bd02538 100644 --- a/src/nat/gnunet-helper-nat-server-windows.c +++ b/src/nat/gnunet-helper-nat-server-windows.c @@ -41,6 +41,8 @@ * - Christian Grothoff */ #define _GNU_SOURCE +/* Instead of including gnunet_common.h */ +#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0) #define FD_SETSIZE 1024 #include -- 2.25.1