@@ -639,6 +639,11 @@ ngx_http_link_func_proceed_init_calls(ngx_cycle_t* cycle, ngx_http_link_func_sr
639
639
/**** Init the client apps ngx_http_link_func_init ***/
640
640
char * error ;
641
641
ngx_http_link_func_app_cycle_handler func ;
642
+
643
+ #if __FreeBSD__
644
+ (void ) dlerror ();
645
+ #endif
646
+
642
647
* (void * * )(& func ) = dlsym (scf -> _app , (const char * )"ngx_link_func_init_cycle" );
643
648
if ((error = dlerror ()) != NULL ) {
644
649
ngx_log_error (NGX_LOG_WARN , cycle -> log , 0 , "Unable to init call %s , skipped init called" , error );
@@ -904,6 +909,11 @@ ngx_http_link_func_module_init(ngx_cycle_t *cycle) {
904
909
ngx_http_link_func_loc_conf_t * lcf = cflq -> _loc_conf ;
905
910
if ( lcf && lcf -> _method_name .len > 0 ) {
906
911
if ( ( lcf -> _handler = ngx_http_link_func_get_duplicate_handler (scf , & lcf -> _method_name ) ) == NULL ) {
912
+
913
+ #if __FreeBSD__
914
+ (void ) dlerror ();
915
+ #endif
916
+
907
917
* (void * * )(& lcf -> _handler ) = dlsym (scf -> _app , (const char * )lcf -> _method_name .data );
908
918
if ((error = dlerror ()) != NULL ) {
909
919
ngx_log_error (NGX_LOG_EMERG , cycle -> log , 0 , "Error function load: %s" , error );
@@ -1001,6 +1011,11 @@ ngx_http_link_func_process_exit(ngx_cycle_t *cycle) {
1001
1011
if (scf && scf -> _app ) {
1002
1012
/*** Exiting the client apps ***/
1003
1013
ngx_http_link_func_app_cycle_handler func ;
1014
+
1015
+ #if __FreeBSD__
1016
+ (void ) dlerror ();
1017
+ #endif
1018
+
1004
1019
* (void * * )(& func ) = dlsym (scf -> _app , (const char * )"ngx_link_func_exit_cycle" );
1005
1020
if ((error = dlerror ()) != NULL ) {
1006
1021
ngx_log_error (NGX_LOG_WARN , cycle -> log , 0 , "Unable to exit call %s , skipped exit called" , error );
@@ -2637,4 +2652,3 @@ ngx_http_link_func_https_request(ngx_conf_t *cf, ngx_http_link_func_srv_conf_t*
2637
2652
#endif
2638
2653
2639
2654
/*** End Download Feature Support ***/
2640
-
0 commit comments