diff options
| author | Bert JW Regeer | 2012-02-18 03:09:02 -0700 |
|---|---|---|
| committer | Max Howell | 2012-02-20 19:01:46 +0000 |
| commit | 799126c40ac15948fa967a082e63da154a22fe11 (patch) | |
| tree | b814799c0e9442fa87812344c45fbf6468e12a87 /Library | |
| parent | 341f9e1da4db129d80660537d607102954a31c74 (diff) | |
| download | homebrew-799126c40ac15948fa967a082e63da154a22fe11.tar.bz2 | |
Add small patch to fix build of nmap with clang
This adds a very small patch to fix an issue with building nmap with
clang. The crux of the issue is that clang no longer compiles files with
void main() instead requiring int main(). This causes the configure to
fail when attempting to identify if a certain feature exists which
causes nmap to include its own version which off course causes a compile
failure because now you have two structs with the same name and two
functions with the same name in the same compilation unit.
This patch should probably be sent upstream as well.
Closes #10302.
Closes #10300.
Signed-off-by: Max Howell <max@methylblue.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/nmap.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/nmap.rb b/Library/Formula/nmap.rb index 9e6155a1f..55439fc8a 100644 --- a/Library/Formula/nmap.rb +++ b/Library/Formula/nmap.rb @@ -25,4 +25,36 @@ class Nmap < Formula system "make" # separate steps required otherwise the build fails system "make install" end + + def patches + # The configure script has a C file to test for some functionality that + # uses void main(void). This does not compile with clang but does compile + # with GCC/gcc-llvm. This small patch fixes the issues so that the + # project will compile without issues with clang as well. + # + # See: https://github.com/mxcl/homebrew/issues/10300 + DATA + end end + +__END__ +--- nmap-5.51/nbase/configure 2012-02-18 02:40:16.000000000 -0700 ++++ nmap-5.51/nbase/configure.old 2012-02-18 02:40:01.000000000 -0700 +@@ -4509,7 +4509,7 @@ + #include <sys/socket.h> + #endif + +-void main(void) { ++int main(void) { + struct addrinfo hints, *ai; + int error; + +@@ -4641,7 +4641,7 @@ + #include <netinet/in.h> + #endif + +-void main(void) { ++int main(void) { + struct sockaddr_in sa; + char hbuf[256]; + int error; |
