Skip to content

Commit

Permalink
net-p2p/opendchub: Fix build with more recent Perl versions.
Browse files Browse the repository at this point in the history
PR:		ports/264255
  • Loading branch information
delphij committed Aug 13, 2023
1 parent cd09f2a commit 78ca3ba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions net-p2p/opendchub/Makefile
@@ -1,5 +1,6 @@
PORTNAME= opendchub
PORTVERSION= 0.8.3
PORTREVISION= 1
CATEGORIES= net-p2p
MASTER_SITES= SF/${PORTNAME}/Open%20DC%20Hub/${PORTVERSION}

Expand Down
26 changes: 26 additions & 0 deletions net-p2p/opendchub/files/patch-src_xs__functions.c
@@ -0,0 +1,26 @@
--- src/xs_functions.c.orig 2014-08-14 15:04:19 UTC
+++ src/xs_functions.c
@@ -277,7 +277,10 @@ XS(xs_check_if_banned)
if(ret != 1)
ret = check_if_banned(user, NICKBAN);

- (ret == 1) ? XSRETURN_IV(1) : XSRETURN_IV(0);
+ if (ret == 1)
+ XSRETURN_IV(1);
+ else
+ XSRETURN_IV(0);
}

XS(xs_check_if_allowed)
@@ -297,7 +300,10 @@ XS(xs_check_if_allowed)

ret = check_if_allowed(user);

- (ret == 1) ? XSRETURN_IV(1) : XSRETURN_IV(0);
+ if (ret == 1)
+ XSRETURN_IV(1);
+ else
+ XSRETURN_IV(0);
}

XS(xs_data_to_user)

0 comments on commit 78ca3ba

Please sign in to comment.