lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

040-clear_dynlink_errors.patch (3039B)


      1 --- a/faad.c
      2 +++ b/faad.c
      3 @@ -594,6 +594,8 @@ static bool load_faad() {
      4  		return false;
      5  	}
      6  
      7 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
      8 +
      9  	a->NeAACDecGetCurrentConfiguration = dlsym(handle, "NeAACDecGetCurrentConfiguration");
     10  	a->NeAACDecSetConfiguration = dlsym(handle, "NeAACDecSetConfiguration");
     11  	a->NeAACDecOpen = dlsym(handle, "NeAACDecOpen");
     12 --- a/ffmpeg.c
     13 +++ b/ffmpeg.c
     14 @@ -620,6 +620,8 @@ static bool load_ff() {
     15  		return false;
     16  	}
     17  
     18 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
     19 +
     20  	sprintf(name, LIBAVFORMAT, LIBAVFORMAT_VERSION_MAJOR);
     21  	handle_format = dlopen(name, RTLD_NOW);
     22  	if (!handle_format) {
     23 --- a/flac.c
     24 +++ b/flac.c
     25 @@ -241,6 +241,8 @@ static bool load_flac() {
     26  		return false;
     27  	}
     28  
     29 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
     30 +
     31  	f->FLAC__StreamDecoderErrorStatusString = dlsym(handle, "FLAC__StreamDecoderErrorStatusString");
     32  	f->FLAC__StreamDecoderStateString = dlsym(handle, "FLAC__StreamDecoderStateString");
     33  	f->FLAC__stream_decoder_new = dlsym(handle, "FLAC__stream_decoder_new");
     34 --- a/ir.c
     35 +++ b/ir.c
     36 @@ -168,10 +168,10 @@ static void *ir_thread() {
     37  			UNLOCK_I;
     38  			wake_controller();
     39  		}
     40 -		
     41 +
     42  		free(code);
     43  	}
     44 -	
     45 +
     46  	return 0;
     47  }
     48  
     49 @@ -185,6 +185,8 @@ static bool load_lirc() {
     50  		return false;
     51  	}
     52  
     53 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
     54 +
     55  	i->lirc_init = dlsym(handle, "lirc_init");
     56  	i->lirc_deinit = dlsym(handle, "lirc_deinit");
     57  	i->lirc_readconfig = dlsym(handle, "lirc_readconfig");
     58 --- a/mad.c
     59 +++ b/mad.c
     60 @@ -365,7 +365,9 @@ static bool load_mad() {
     61  		LOG_INFO("dlerror: %s", dlerror());
     62  		return false;
     63  	}
     64 -	
     65 +
     66 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
     67 +
     68  	m->mad_stream_init = dlsym(handle, "mad_stream_init");
     69  	m->mad_frame_init = dlsym(handle, "mad_frame_init");
     70  	m->mad_synth_init = dlsym(handle, "mad_synth_init");
     71 --- a/mpg.c
     72 +++ b/mpg.c
     73 @@ -222,7 +222,9 @@ static bool load_mpg() {
     74  		LOG_INFO("dlerror: %s", dlerror());
     75  		return false;
     76  	}
     77 -	
     78 +
     79 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
     80 +
     81  	m->mpg123_init = dlsym(handle, "mpg123_init");
     82  	m->mpg123_feature = dlsym(handle, "mpg123_feature");
     83  	m->mpg123_rates = dlsym(handle, "mpg123_rates");
     84 --- a/resample.c
     85 +++ b/resample.c
     86 @@ -251,6 +251,8 @@ static bool load_soxr(void) {
     87  		return false;
     88  	}
     89  
     90 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
     91 +
     92  	r->soxr_io_spec = dlsym(handle, "soxr_io_spec");
     93  	r->soxr_quality_spec = dlsym(handle, "soxr_quality_spec");
     94  	r->soxr_create = dlsym(handle, "soxr_create");
     95 --- a/vorbis.c
     96 +++ b/vorbis.c
     97 @@ -287,6 +287,8 @@ static bool load_vorbis() {
     98  		}
     99  	}
    100  
    101 +	err = dlerror();	// Reset previous dynamic linking error string (if there was)
    102 +
    103  	v->ov_read = tremor ? NULL : dlsym(handle, "ov_read");
    104  	v->ov_read_tremor = tremor ? dlsym(handle, "ov_read") : NULL;
    105  	v->ov_info = dlsym(handle, "ov_info");