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

Commit 8121872

Browse files
update for FreeBSD remove validity Check warning when starting nginx
1 parent 014cfcc commit 8121872

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎src/ngx_link_func_module.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ ngx_http_link_func_application_compatibility_check(ngx_conf_t *cf, ngx_http_core
812812
return NGX_ERROR;
813813
}
814814

815+
#if __FreeBSD__
816+
(void) dlerror();
817+
#endif
815818
/* * check init function block, this version has to be at least init with empty function * */
816819
ngx_http_link_func_app_cycle_handler func;
817820
*(void**)(&func) = dlsym(scf->_app, (const char*)"ngx_link_func_init_cycle");
@@ -821,6 +824,11 @@ ngx_http_link_func_application_compatibility_check(ngx_conf_t *cf, ngx_http_core
821824
&scf->_libname, error);
822825
return NGX_ERROR;
823826
}
827+
828+
#if __FreeBSD__
829+
(void) dlerror();
830+
#endif
831+
824832
*(void**)(&func) = dlsym(scf->_app, (const char*)"ngx_link_func_exit_cycle");
825833
if ((error = dlerror()) != NULL) {
826834
ngx_conf_log_error(NGX_LOG_ERR, cf, 0,
@@ -838,6 +846,11 @@ ngx_http_link_func_application_compatibility_check(ngx_conf_t *cf, ngx_http_core
838846

839847
ngx_http_link_func_loc_conf_t *lcf = cflq->_loc_conf;
840848
if ( lcf && lcf->_method_name.len > 0 ) {
849+
850+
#if __FreeBSD__
851+
(void) dlerror();
852+
#endif
853+
841854
*(void**)(&lcf->_handler) = dlsym(scf->_app, (const char*)lcf->_method_name.data);
842855
if ((error = dlerror()) != NULL) {
843856
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "Error function load: %s", error);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /