[or-cvs] Fix windows build

Nick Mathewson nickm at seul.org
Thu Nov 4 04:01:22 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv4019/src/or

Modified Files:
	config.c 
Log Message:
Fix windows build

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- config.c	4 Nov 2004 03:25:43 -0000	1.200
+++ config.c	4 Nov 2004 04:01:19 -0000	1.201
@@ -63,7 +63,7 @@
 } 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>"



More information about the tor-commits mailing list