Unbreak arirang -- it needs to use the newer Ruby API, which, at the
time the last release was made, was still known as RUBY_19. While here, fix an ancient bug reported by clang.
This commit is contained in:
parent
7e796c89d0
commit
af331e2341
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=381996
2 changed files with 26 additions and 9 deletions
|
@ -20,6 +20,7 @@ USE_LIBRUBY= yes
|
|||
USE_OPENSSL= yes
|
||||
|
||||
CFLAGS+= -I${LOCALBASE}/include/ruby-${RUBY_VER} -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
|
||||
CFLAGS+= -DRUBY_19
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/arirang ${STAGEDIR}${PREFIX}/sbin
|
||||
|
@ -28,12 +29,4 @@ do-install:
|
|||
${INSTALL_DATA} ${WRKSRC}/scanrule/*.uxe ${STAGEDIR}${PREFIX}/share/arirang
|
||||
${INSTALL_DATA} ${WRKSRC}/script/*.rb ${STAGEDIR}${PREFIX}/share/arirang
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${RUBY_VER} >= 2.0
|
||||
BROKEN= Does not build with Ruby 2.0 or newer
|
||||
.endif
|
||||
DEPRECATED= Does not work with Ruby 2.x
|
||||
EXPIRATION_DATE= 2015-03-28
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
|
24
security/arirang/files/patch-proxy.c
Normal file
24
security/arirang/files/patch-proxy.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
Do not attempt to close the sock we never opened. Use herror() to report
|
||||
a DNS-failure, not perror().
|
||||
|
||||
-mi
|
||||
|
||||
--- proxy.c 2011-05-17 22:19:11.000000000 -0400
|
||||
+++ proxy.c 2015-03-23 09:46:34.000000000 -0400
|
||||
@@ -94,15 +94,13 @@
|
||||
struct hostent *he;
|
||||
|
||||
if ((he = gethostbyname(proxyhost)) == NULL) {
|
||||
- perror("proxy host not found");
|
||||
- close(sock);
|
||||
+ herror("proxy host not found");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
|
||||
perror("socket");
|
||||
- close(sock);
|
||||
exit(0);
|
||||
}
|
||||
http.sin_family = AF_INET;
|
Loading…
Reference in a new issue