bbcp: fix implicit int build error with patch
This commit fixes a build failure caused by `main`'s use of an implicit `int` return type specifier. The embedded patch just makes the return type explicit. ISSUE As of C99, a declaration that lacks a type specifier isn't implicitly assumed to be int, which causes the build to fail with this error: bbcp.C:61:1: error: C++ requires a type specifier for all declarations main(int argc, char *argv[], char *envp[]) ^~~~ ENVIRONMENT - g++ : Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn) - OS : Mac OS X 10.8.5 (Build 12F37) NOTES - Confirmed Formula passes audit. - Also sent the patch to the upstream developer. Closes Homebrew/homebrew#22832. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
94fffd72f1
commit
e46eea00e7
1 changed files with 19 additions and 0 deletions
|
@ -5,6 +5,10 @@ class Bbcp < Formula
|
|||
url 'http://www.slac.stanford.edu/~abh/bbcp/bbcp.tgz'
|
||||
version '13.05.03.00.0'
|
||||
sha1 '218911904b46f7aff3784705581737f53eccbc53'
|
||||
head 'http://www.slac.stanford.edu/~abh/bbcp/bbcp.git'
|
||||
|
||||
# Adds missing required return type specification on 'main'
|
||||
def patches; DATA; end
|
||||
|
||||
def install
|
||||
mkdir "bin"
|
||||
|
@ -21,3 +25,18 @@ class Bbcp < Formula
|
|||
system "#{bin}/bbcp", "--help"
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
diff --git c/src/bbcp.C w/src/bbcp.C
|
||||
index 03c6d4e..7116fff 100644
|
||||
--- c/src/bbcp.C
|
||||
+++ w/src/bbcp.C
|
||||
@@ -58,7 +58,7 @@ extern bbcp_System bbcp_OS;
|
||||
/* m a i n */
|
||||
/******************************************************************************/
|
||||
|
||||
-main(int argc, char *argv[], char *envp[])
|
||||
+int main(int argc, char *argv[], char *envp[])
|
||||
{
|
||||
bbcp_Node *Source, *Sink;
|
||||
bbcp_Protocol Protocol;
|
||||
|
|
Loading…
Reference in a new issue