From 640b932cf80a29bd7475d805712b42e458772a98 Mon Sep 17 00:00:00 2001 From: Po-Chuan Hsieh Date: Sat, 13 Jul 2019 12:58:36 +0000 Subject: [PATCH] Fix test on FreeBSD google/protobuf/testing/zcgzip.cc:61:25: error: unknown type name 'STDOUT_FILENO' FileOutputStream fout(STDOUT_FILENO); ^ google/protobuf/testing/zcgzip.cc:61:24: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse] FileOutputStream fout(STDOUT_FILENO); ^~~~~~~~~~~~~~~ google/protobuf/testing/zcgzip.cc:61:25: note: add a pair of parentheses to declare a variable FileOutputStream fout(STDOUT_FILENO); ^ ( google/protobuf/testing/zcgzip.cc:75:20: error: use of undeclared identifier 'STDIN_FILENO' readlen = read(STDIN_FILENO, outptr, outlen); ^ 1 warning and 2 errors generated. gmake[3]: *** [Makefile:4009: google/protobuf/testing/zcgzip.o] Error 1 google/protobuf/testing/zcgunzip.cc:62:23: error: unknown type name 'STDIN_FILENO' FileInputStream fin(STDIN_FILENO); ^ google/protobuf/testing/zcgunzip.cc:62:22: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse] FileInputStream fin(STDIN_FILENO); ^~~~~~~~~~~~~~ google/protobuf/testing/zcgunzip.cc:62:23: note: add a pair of parentheses to declare a variable FileInputStream fin(STDIN_FILENO); ^ ( google/protobuf/testing/zcgunzip.cc:74:23: error: use of undeclared identifier 'STDOUT_FILENO' int err = write(STDOUT_FILENO, inptr, inlen); ^ 1 warning and 2 errors generated. gmake[3]: *** [Makefile:4009: google/protobuf/testing/zcgunzip.o] Error 1 Reference: https://bugs.FreeBSD.org/bugzilla/show_bug.cgi?id=215346 https://svnweb.FreeBSD.org/changeset/ports/428734 --- src/google/protobuf/testing/zcgunzip.cc | 1 + src/google/protobuf/testing/zcgzip.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/src/google/protobuf/testing/zcgunzip.cc b/src/google/protobuf/testing/zcgunzip.cc index 349ad86ee6..d3403fd1e6 100644 --- a/src/google/protobuf/testing/zcgunzip.cc +++ b/src/google/protobuf/testing/zcgunzip.cc @@ -42,6 +42,7 @@ #include #include #include +#include #ifdef _WIN32 #ifndef STDIN_FILENO diff --git a/src/google/protobuf/testing/zcgzip.cc b/src/google/protobuf/testing/zcgzip.cc index 992ddc6ed6..4875755e37 100644 --- a/src/google/protobuf/testing/zcgzip.cc +++ b/src/google/protobuf/testing/zcgzip.cc @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef _WIN32 #ifndef STDIN_FILENO