net/pecl-radius: Fix build with php84

This commit is contained in:
Po-Chuan Hsieh 2024-07-30 03:02:58 +08:00
parent ea50e3b61c
commit 6ecf81cce5
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
2 changed files with 14 additions and 1 deletions

View File

@ -13,7 +13,6 @@ LICENSE= BSD3CLAUSE
USES= php:pecl
CONFIGURE_ARGS= --enable-radius
IGNORE_WITH_PHP=84
OPTIONS_DEFINE= EXAMPLES

View File

@ -0,0 +1,14 @@
--- radlib_compat.h.orig 2016-02-15 15:11:50 UTC
+++ radlib_compat.h
@@ -39,7 +39,11 @@ any other GPL-like (LGPL, GPL2) License.
#endif
#include "php.h"
+#if PHP_VERSION_ID >= 80400
+#include "ext/random/php_random.h"
+#else
#include "ext/standard/php_rand.h"
+#endif
#include "ext/standard/php_standard.h"
#define MPPE_KEY_LEN 16