diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-09-30 12:58:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-30 12:58:48 -0400 |
commit | 2835dcf69f5bafd634a1b65fa28c08d4f1ce3306 (patch) | |
tree | 53281b63280aa9fc542954e063b96ed4563887a3 /src | |
parent | 1779fee27ab8126682f5f7d2f9aeb5e1978bd875 (diff) | |
download | tor-2835dcf69f5bafd634a1b65fa28c08d4f1ce3306.tar.gz tor-2835dcf69f5bafd634a1b65fa28c08d4f1ce3306.zip |
#if-out the fw-helper code in util.c when building on windows
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index 9d47b76246..1dabaf6c89 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2944,6 +2944,11 @@ static int tor_spawn_background(const char *const filename, int *stdout_read, int *stderr_read, const char **argv) { +#ifdef MS_WINDOWS + (void) filename; (void) stdout_read; (void) stderr_read; (void) argv; + log_warn(LD_BUG, "not yet implemented on Windows."); + return -1; +#else pid_t pid; int stdout_pipe[2]; int stderr_pipe[2]; @@ -3098,6 +3103,7 @@ tor_spawn_background(const char *const filename, int *stdout_read, } return pid; +#endif } /** Read from stream, and send lines to log at the specified log level. @@ -3179,7 +3185,13 @@ void tor_check_port_forwarding(const char *filename, int dir_port, int or_port, time_t now) { - +#ifdef MS_WINDOWS + (void) filename; (void) dir_port; (void) or_port; (void) now; + (void) tor_spawn_background; + (void) log_from_pipe; + log_warn(LD_GENERAL, "Sorry, port forwarding is not yet supported " + "on windows."); +#else /* When fw-helper succeeds, how long do we wait until running it again */ #define TIME_TO_EXEC_FWHELPER_SUCCESS 300 /* When fw-helper fails, how long do we wait until running it again */ @@ -3272,6 +3284,7 @@ tor_check_port_forwarding(const char *filename, int dir_port, int or_port, child_pid = -1; } } +#endif } |