diff options
| author | Jeremy | 2011-07-22 14:43:50 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2011-07-29 08:45:54 -0700 |
| commit | 46f5535aef77a882accda5eda27e2dc5dbeb65c5 (patch) | |
| tree | c528df6f4b35fc19aa027ae62fb31ea4de4acd6f | |
| parent | 5a0b3e8ef461f5ff90ae152b750b5571e0a97b14 (diff) | |
| download | homebrew-46f5535aef77a882accda5eda27e2dc5dbeb65c5.tar.bz2 | |
OpenVPN: fix compilation on Lion
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/openvpn.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Library/Formula/openvpn.rb b/Library/Formula/openvpn.rb index e4b4d7082..248645c73 100644 --- a/Library/Formula/openvpn.rb +++ b/Library/Formula/openvpn.rb @@ -10,6 +10,13 @@ class Openvpn < Formula skip_clean 'etc' skip_clean 'var' + # This patch fixes compilation on Lion + # There is a long history of confusion between these two consts: + # http://www.google.com/search?q=SOL_IP+IPPROTO_IP + def patches + DATA + end + def install # Build and install binary system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" @@ -94,3 +101,20 @@ EOS EOS end end + +__END__ +diff --git a/socket.c b/socket.c +index 4720398..faa1782 100644 +--- a/socket.c ++++ b/socket.c +@@ -35,6 +35,10 @@ + + #include "memdbg.h" + ++#ifndef SOL_IP ++#define SOL_IP IPPROTO_IP ++#endif ++ + const int proto_overhead[] = { /* indexed by PROTO_x */ + IPv4_UDP_HEADER_SIZE, + IPv4_TCP_HEADER_SIZE, |
