diff options
| author | Zsolt Tripolszky | 2011-09-05 11:34:54 +0200 |
|---|---|---|
| committer | Jack Nagel | 2011-09-05 17:04:58 -0500 |
| commit | 42797ec4b3373f52635e71a4b69002de48ff2af5 (patch) | |
| tree | 8a40196e5eb0cc2b7c4fee23579fa26d6f2a8016 /Library/Formula | |
| parent | dcf643850d895645a6109639db1ac92f9955fa4f (diff) | |
| download | homebrew-42797ec4b3373f52635e71a4b69002de48ff2af5.tar.bz2 | |
ldapvi: fix namespace clash with Lion's getline()
The patch is in the upstream git repository, so it should be in the next
version. Fixes #6606.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ldapvi.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Library/Formula/ldapvi.rb b/Library/Formula/ldapvi.rb index 886309c57..3c56afbae 100644 --- a/Library/Formula/ldapvi.rb +++ b/Library/Formula/ldapvi.rb @@ -14,4 +14,50 @@ class Ldapvi < Formula system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" system "make install" end + + # 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 + def patches + DATA + end + end + +__END__ +diff -rupN ldapvi-1.7-orig/common.h ldapvi-1.7-new/common.h +--- ldapvi-1.7-orig/common.h 2007-05-05 12:17:26.000000000 +0200 ++++ ldapvi-1.7-new/common.h 2011-09-02 21:40:45.000000000 +0200 +@@ -273,7 +273,7 @@ void pipeview_wait(int pid); + char *home_filename(char *name); + void read_ldapvi_history(void); + void write_ldapvi_history(void); +-char *getline(char *prompt, char *value); ++char *ldapvi_getline(char *prompt, char *value); + char *get_password(); + char *append(char *a, char *b); + void *xalloc(size_t size); +diff -rupN ldapvi-1.7-orig/ldapvi.c ldapvi-1.7-new/ldapvi.c +--- ldapvi-1.7-orig/ldapvi.c 2007-05-05 12:17:26.000000000 +0200 ++++ ldapvi-1.7-new/ldapvi.c 2011-09-02 21:41:17.000000000 +0200 +@@ -470,7 +470,7 @@ change_mechanism(bind_options *bo) + bo->authmethod = LDAP_AUTH_SASL; + puts("Switching to SASL authentication."); + } +- bo->sasl_mech = getline("SASL mechanism", bo->sasl_mech); ++ bo->sasl_mech = ldapvi_getline("SASL mechanism", bo->sasl_mech); + } + + static int +diff -rupN ldapvi-1.7-orig/misc.c ldapvi-1.7-new/misc.c +--- ldapvi-1.7-orig/misc.c 2007-05-05 12:17:26.000000000 +0200 ++++ ldapvi-1.7-new/misc.c 2011-09-02 21:41:45.000000000 +0200 +@@ -315,7 +315,7 @@ write_ldapvi_history() + } + + char * +-getline(char *prompt, char *value) ++ldapvi_getline(char *prompt, char *value) + { + tdialog d; + init_dialog(&d, DIALOG_DEFAULT, prompt, value); |
