aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/subprocess.cc
diff options
context:
space:
mode:
authorGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-12-18 07:20:43 +0000
committerGravatar kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2009-12-18 07:20:43 +0000
commit91218afc67773ebf85e37d91c80cb3a7d423b0ba (patch)
treea2f5a73a5a136924ae07064f366c22deefddf4a2 /src/google/protobuf/compiler/subprocess.cc
parent5e744ff9612da1add0dd0f893242703246c00d0c (diff)
Fix Cygwin build.
Diffstat (limited to 'src/google/protobuf/compiler/subprocess.cc')
-rw-r--r--src/google/protobuf/compiler/subprocess.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/subprocess.cc b/src/google/protobuf/compiler/subprocess.cc
index 4f3cfa16..33f5bd6b 100644
--- a/src/google/protobuf/compiler/subprocess.cc
+++ b/src/google/protobuf/compiler/subprocess.cc
@@ -115,8 +115,11 @@ bool Subprocess::Communicate(const Message& input, Message* output,
GOOGLE_CHECK_NE(child_stdin_, -1) << "Must call Start() first.";
+ // The "sighandler_t" typedef is GNU-specific, so define our own.
+ typedef void SignalHandler(int);
+
// Make sure SIGPIPE is disabled so that if the child dies it doesn't kill us.
- sighandler_t old_pipe_handler = signal(SIGPIPE, SIG_IGN);
+ SignalHandler* old_pipe_handler = signal(SIGPIPE, SIG_IGN);
string input_data = input.SerializeAsString();
string output_data;