aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ldapvi.rb
diff options
context:
space:
mode:
authorMark Harrison2012-08-15 11:17:32 -0400
committerAdam Vandenberg2012-09-04 11:37:55 -0700
commit05034d444b085a0ca2f4974c2a66978d3ee9f906 (patch)
tree260cb6f0e4b1cd9e4119026f2fff233c011a92ff /Library/Formula/ldapvi.rb
parent18dce4bae3c8f20a8f345c69b3da18bd5e697c01 (diff)
downloadhomebrew-05034d444b085a0ca2f4974c2a66978d3ee9f906.tar.bz2
ldapvi: fix compile error with clang
Closes #14208. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/ldapvi.rb')
-rw-r--r--Library/Formula/ldapvi.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/ldapvi.rb b/Library/Formula/ldapvi.rb
index d927824b6..e4c0b367d 100644
--- a/Library/Formula/ldapvi.rb
+++ b/Library/Formula/ldapvi.rb
@@ -18,6 +18,7 @@ class Ldapvi < Formula
# Backporting the fix from the devel version
# (namespace conflict with Lion's getline function)
# http://www.lichteblau.com/git/?p=ldapvi.git;a=commit;h=256ced029c235687bfafdffd07be7d47bf7af39b
+ # Also fix compilation with clang by changing `return` to `return 0`.
def patches
DATA
end
@@ -61,3 +62,14 @@ diff -rupN ldapvi-1.7-orig/misc.c ldapvi-1.7-new/misc.c
{
tdialog d;
init_dialog(&d, DIALOG_DEFAULT, prompt, value);
+--- ldapvi-1.7/ldapvi.c 2012-08-15 10:58:23.000000000 -0400
++++ ldapvi-1.7/ldapvi.c.new 2012-08-15 10:58:12.000000000 -0400
+@@ -1465,7 +1465,7 @@
+ int line = 0;
+ int c;
+
+- if (lstat(sasl, &st) == -1) return;
++ if (lstat(sasl, &st) == -1) return 0;
+ if ( !(in = fopen(sasl, "r"))) syserr();
+
+ if (st.st_size > 0) {