diff options
| author | Jack Nagel | 2013-12-12 14:00:36 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-12 14:00:36 -0600 |
| commit | ea980d2a05a0c2a9afc058f720513b0bf913ee69 (patch) | |
| tree | 9059cac73551d192e3a4f6e2159f5e2b4623e051 /Library/Formula | |
| parent | 89e826c4aaf4768d56e519391b367db01c1e4c72 (diff) | |
| download | homebrew-ea980d2a05a0c2a9afc058f720513b0bf913ee69.tar.bz2 | |
proxytunnel: patch out bad strlcpy/strlcat declarations
This project seems dead but the current fix is not ideal.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/proxytunnel.rb | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/Library/Formula/proxytunnel.rb b/Library/Formula/proxytunnel.rb index 7be477775..3309bb2f6 100644 --- a/Library/Formula/proxytunnel.rb +++ b/Library/Formula/proxytunnel.rb @@ -5,15 +5,40 @@ class Proxytunnel < Formula url 'http://downloads.sourceforge.net/proxytunnel/proxytunnel-1.9.0.tgz' sha1 '51d816125bb9e9bca267d35f861000eb0fa9d80b' - def install - if MacOS.version >= :mavericks - # http://trac.macports.org/browser/trunk/dports/net/proxytunnel/Portfile - inreplace ["proxytunnel.h", "setproctitle.c", "strlcat.c", "strzcat.c"], "strlcat", "strlcat_disable" - inreplace ["proxytunnel.h", "setproctitle.c", "strlcpy.c"], "strlcpy", "strlcpy_disable" - end + # Remove conflicting strlcpy/strlcat declarations + def patches; DATA; end + def install system "make" bin.install "proxytunnel" man1.install "proxytunnel.1" end end + +__END__ +diff --git a/Makefile b/Makefile +index 9e9ac73..8244b55 100644 +--- a/Makefile ++++ b/Makefile +@@ -56,8 +56,6 @@ PROGNAME = proxytunnel + # Remove strlcpy/strlcat on (open)bsd/darwin systems + OBJ = proxytunnel.o \ + base64.o \ +- strlcpy.o \ +- strlcat.o \ + strzcat.o \ + setproctitle.o \ + io.o \ +diff --git a/proxytunnel.h b/proxytunnel.h +index b948be0..e63c72a 100644 +--- a/proxytunnel.h ++++ b/proxytunnel.h +@@ -32,8 +32,6 @@ void closeall(); + void do_daemon(); + void initsetproctitle(int argc, char *argv[]); + void setproctitle(const char *fmt, ...); +-size_t strlcat(char *dst, const char *src, size_t siz); +-size_t strlcpy(char *dst, const char *src, size_t siz); + size_t strzcat(char *dst, char *format, ...); + int main( int argc, char *argv[] ); + char * readpassphrase(const char *, char *, size_t, int); |
