* when finding out whether or not R5 compatibility mode is required, we may have
to scan loaded libraries, too, as the dependency on network libraries may not be present in the executable image, but may be "hidden" in one of those library images (as is the case with Beam). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26277 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Axel Dörfler, [email protected]
|
* Axel Dörfler, [email protected]
|
||||||
|
* Oliver Tappe, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -59,12 +60,14 @@ initialize_before()
|
|||||||
|
|
||||||
// We're using the BeOS startup code, check if BONE libraries are in
|
// We're using the BeOS startup code, check if BONE libraries are in
|
||||||
// use, and if not, enable the R5 compatibility layer.
|
// use, and if not, enable the R5 compatibility layer.
|
||||||
|
// As dependencies to network libraries may be "hidden" in libraries, we
|
||||||
const char *name;
|
// may have to scan not only the executable, but every loaded image.
|
||||||
cookie = 0;
|
|
||||||
int enable = 0;
|
int enable = 0;
|
||||||
|
uint32 crumble;
|
||||||
while (__get_next_image_dependency(info.id, &cookie, &name) == B_OK) {
|
const char *name;
|
||||||
|
do {
|
||||||
|
crumble = 0;
|
||||||
|
while (__get_next_image_dependency(info.id, &crumble, &name) == B_OK) {
|
||||||
if (!strcmp(name, "libbind.so")
|
if (!strcmp(name, "libbind.so")
|
||||||
|| !strcmp(name, "libsocket.so")
|
|| !strcmp(name, "libsocket.so")
|
||||||
|| !strcmp(name, "libbnetapi.so")
|
|| !strcmp(name, "libbnetapi.so")
|
||||||
@@ -79,5 +82,9 @@ initialize_before()
|
|||||||
__gR5Compatibility = true;
|
__gR5Compatibility = true;
|
||||||
find_own_image();
|
find_own_image();
|
||||||
debug_printf("libnetwork.so running in R5 compatibility mode.\n");
|
debug_printf("libnetwork.so running in R5 compatibility mode.\n");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
} while(enable == 0
|
||||||
|
&& get_next_image_info(B_CURRENT_TEAM, (int32 *)&cookie, &info)
|
||||||
|
== B_OK);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user