Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5bbb83

Browse files
author
Felipe Zimmerle
committed
Fix compilation for 2.2.x and standalone afterowasp-modsecurity#1289
1 parent4b5a635 commita5bbb83

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

‎apache2/modsecurity.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ static void modsecurity_persist_data(modsec_rec *msr) {
237237
}
238238

239239
/* Remove stale collections. */
240+
#ifAP_SERVER_MAJORVERSION_NUMBER>1&&AP_SERVER_MINORVERSION_NUMBER>3
240241
if (ap_random_pick(0,RAND_MAX)<RAND_MAX/100) {
242+
#else
243+
if (rand()<RAND_MAX/100) {
244+
#endif
241245
arr=apr_table_elts(msr->collections);
242246
te= (apr_table_entry_t*)arr->elts;
243247
for (i=0;i<arr->nelts;i++) {

‎standalone/server.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ static char *http2env(apr_pool_t *a, const char *w)
187187
returnres;
188188
}
189189

190+
AP_DECLARE(apr_uint32_t)ap_random_pick(apr_uint32_tmin,apr_uint32_tmax)
191+
{
192+
returnrand();
193+
}
194+
190195
AP_DECLARE(char*)ap_escape_html2(apr_pool_t*p,constchar*s,inttoasc)
191196
{
192197
inti,j;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp