[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:47 UTC 2009
The following commit has been merged in the upstream branch:
commit 151ca90dcc2213869a889c5d6e4f2ee6b9d425ba
Author: Clint Adams <schizo at debian.org>
Date: Tue Oct 27 01:11:41 2009 -0400
Apply VMware patch: "Remove the unused 'done' variable in load_library_symbols(): the function can only be called once, so there is no need for the variable anyway."
diff --git a/libfakeroot.c b/libfakeroot.c
index b5a6515..6f67ef7 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -149,6 +149,7 @@ int fakeroot_disabled = 0;
void load_library_symbols(void){
/* this function loads all original functions from the C library.
+ This function is only called once.
I ran into problems when each function individually
loaded it's original counterpart, as RTLD_NEXT seems to have
a different meaning in files with different names than libtricks.c
@@ -160,17 +161,14 @@ void load_library_symbols(void){
to this function. The other generated .h files do even more tricky
things :) */
- static int done=0;
int i;
const char *msg;
- if(!done){
- for(i=0; next_wrap[i].doit; i++){
- *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
- if ( (msg = dlerror()) != NULL){
- fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
-/* abort ();*/
- }
+ for(i=0; next_wrap[i].doit; i++){
+ *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
+ if ( (msg = dlerror()) != NULL){
+ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
+/* abort ();*/
}
}
}
--
fakeroot
More information about the Fakeroot-commits
mailing list