diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-04 04:01:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-04 04:01:19 +0000 |
commit | b74b72a5ce9dc347e66f786f2be5240945e0d461 (patch) | |
tree | d00138aa37a48205876fae7ca375eb51ff286be2 | |
parent | d0c158c8d69ead9c5d60011589bdf4d379aca208 (diff) | |
download | tor-b74b72a5ce9dc347e66f786f2be5240945e0d461.tar.gz tor-b74b72a5ce9dc347e66f786f2be5240945e0d461.zip |
Fix windows build
svn:r2670
-rw-r--r-- | src/common/compat.c | 2 | ||||
-rw-r--r-- | src/common/torgzip.c | 4 | ||||
-rw-r--r-- | src/common/util.c | 6 | ||||
-rw-r--r-- | src/or/config.c | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 6ce26afc41..7ecc6d9b4d 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -8,6 +8,7 @@ #define _GNU_SOURCE #include "orconfig.h" +#include "compat.h" #ifdef MS_WINDOWS #include <io.h> @@ -65,7 +66,6 @@ #include <string.h> #include <assert.h> -#include "compat.h" #include "log.h" #include "util.h" diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 660ab0e05f..0491d87d14 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -13,7 +13,11 @@ #include <stdlib.h> #include <stdio.h> #include <assert.h> +#ifdef MS_WINDOWS +#include "..\..\contrib\zlib\zlib.h" +#else #include <zlib.h> +#endif #include "util.h" #include "log.h" diff --git a/src/common/util.c b/src/common/util.c index dc5f29bbaa..76b7254cd3 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -14,6 +14,9 @@ #define _GNU_SOURCE #include "orconfig.h" +#include "util.h" +#include "log.h" +#include "crypto.h" /* XXXX probably some of these are unneeded. find out which. */ #ifdef MS_WINDOWS @@ -31,9 +34,6 @@ #include <string.h> #include <assert.h> -#include "util.h" -#include "log.h" -#include "crypto.h" #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> diff --git a/src/or/config.c b/src/or/config.c index ce9ed2e1cb..cd0a9a4a76 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -63,7 +63,7 @@ typedef struct config_var_t { } config_var_t; /** Return the offset of <b>member</b> within the type <b>tp</b>, in bytes */ -#define STRUCT_OFFSET(tp, member) ((off_t) &(((tp*)0)->member)) +#define STRUCT_OFFSET(tp, member) ((off_t) (((char*)&((tp*)0)->member)-(char*)0)) /** An entry for config_vars: "The option <b>name</b> has type * CONFIG_TYPE_<b>conftype</b>, and corresponds to * or_options_t.<b>member</b>" |