mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 17:46:38 -04:00
net/pecl-radius: Fix build with php84 (8.4.0beta4+)
Reference:8cf8751533
3e05c86c35
https://pkg-status.freebsd.org/beefy16/data/133amd64-default/94b089c7ad30/logs/php84-pecl-radius-1.4.0b1_2.log https://pkg-status.freebsd.org/beefy22/data/140amd64-default/94b089c7ad30/logs/php84-pecl-radius-1.4.0b1_2.log https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p94b089c7ad30_sb162fc3f309/logs/php84-pecl-radius-1.4.0b1_2.log
This commit is contained in:
parent
b808c8521d
commit
8ea18beb72
1 changed files with 38 additions and 0 deletions
|
@ -1,3 +1,41 @@
|
||||||
|
--- radlib.c.orig 2016-02-15 15:11:50 UTC
|
||||||
|
+++ radlib.c
|
||||||
|
@@ -582,7 +582,7 @@ rad_create_request(struct rad_handle *h, int code)
|
||||||
|
/* Create a random authenticator */
|
||||||
|
for (i = 0; i < LEN_AUTH; i += 2) {
|
||||||
|
long r;
|
||||||
|
- r = php_rand();
|
||||||
|
+ r = (zend_long) php_mt_rand();
|
||||||
|
h->request[POS_AUTH+i] = (unsigned char) r;
|
||||||
|
h->request[POS_AUTH+i+1] = (unsigned char) (r >> 8);
|
||||||
|
}
|
||||||
|
@@ -753,7 +753,7 @@ rad_auth_open(void)
|
||||||
|
php_srand(time(NULL) * getpid() * (unsigned long) (php_combined_lcg(TSRMLS_C) * 10000.0) TSRMLS_CC);
|
||||||
|
h->fd = -1;
|
||||||
|
h->num_servers = 0;
|
||||||
|
- h->ident = php_rand();
|
||||||
|
+ h->ident = (zend_long) php_mt_rand();
|
||||||
|
h->errmsg[0] = '\0';
|
||||||
|
memset(h->request, 0, sizeof h->request);
|
||||||
|
h->req_len = 0;
|
||||||
|
@@ -1239,7 +1239,7 @@ int rad_salt_value(struct rad_handle *h, const char *i
|
||||||
|
const char *in_pos;
|
||||||
|
MD5_CTX md5;
|
||||||
|
char *out_pos;
|
||||||
|
- php_uint32 random;
|
||||||
|
+ uint32_t random;
|
||||||
|
size_t salted_len;
|
||||||
|
const char *secret;
|
||||||
|
TSRMLS_FETCH();
|
||||||
|
@@ -1289,7 +1289,7 @@ int rad_salt_value(struct rad_handle *h, const char *i
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Generate a random number to use as the salt. */
|
||||||
|
- random = php_rand();
|
||||||
|
+ random = (zend_long) php_mt_rand();
|
||||||
|
|
||||||
|
/* The RFC requires that the high bit of the salt be 1. Otherwise,
|
||||||
|
* let's set up the header. */
|
||||||
--- radlib_compat.h.orig 2016-02-15 15:11:50 UTC
|
--- radlib_compat.h.orig 2016-02-15 15:11:50 UTC
|
||||||
+++ radlib_compat.h
|
+++ radlib_compat.h
|
||||||
@@ -39,7 +39,11 @@ any other GPL-like (LGPL, GPL2) License.
|
@@ -39,7 +39,11 @@ any other GPL-like (LGPL, GPL2) License.
|
||||||
|
|
Loading…
Add table
Reference in a new issue