Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135664368
D31038.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31038.diff
View Options
diff --git a/libexec/rtld-elf/tests/common.h b/libexec/rtld-elf/tests/common.h
--- a/libexec/rtld-elf/tests/common.h
+++ b/libexec/rtld-elf/tests/common.h
@@ -37,7 +37,7 @@
void try_to_run(int binary, int expected_exit_status, char * const *env,
const char *expected_out, const char *expected_err);
-int opendir(const char *name);
+int opendir_fd(const char *name);
int opendirat(int parent, const char *name);
#endif /* _LD_COMMON_H_ */
diff --git a/libexec/rtld-elf/tests/common.c b/libexec/rtld-elf/tests/common.c
--- a/libexec/rtld-elf/tests/common.c
+++ b/libexec/rtld-elf/tests/common.c
@@ -67,7 +67,7 @@
}
int
-opendir(const char *name)
+opendir_fd(const char *name)
{
return open(name, O_RDONLY | O_DIRECTORY);
diff --git a/libexec/rtld-elf/tests/ld_library_pathfds.c b/libexec/rtld-elf/tests/ld_library_pathfds.c
--- a/libexec/rtld-elf/tests/ld_library_pathfds.c
+++ b/libexec/rtld-elf/tests/ld_library_pathfds.c
@@ -159,12 +159,12 @@
setup(struct descriptors *dp, const atf_tc_t *tc)
{
- dp->testdir = opendir(atf_tc_get_config_var(tc, "srcdir"));
+ dp->testdir = opendir_fd(atf_tc_get_config_var(tc, "srcdir"));
ATF_REQUIRE(dp->testdir >= 0);
ATF_REQUIRE(
(dp->binary = openat(dp->testdir, TARGET_ELF_NAME, O_RDONLY)) >= 0);
- ATF_REQUIRE((dp->root = opendir("/")) >= 0);
+ ATF_REQUIRE((dp->root = opendir_fd("/")) >= 0);
ATF_REQUIRE((dp->etc = opendirat(dp->root, "etc")) >= 0);
ATF_REQUIRE((dp->usr = opendirat(dp->root, "usr")) >= 0);
}
diff --git a/libexec/rtld-elf/tests/ld_preload_fds.c b/libexec/rtld-elf/tests/ld_preload_fds.c
--- a/libexec/rtld-elf/tests/ld_preload_fds.c
+++ b/libexec/rtld-elf/tests/ld_preload_fds.c
@@ -39,7 +39,7 @@
{
int testdir;
- testdir = opendir(atf_tc_get_config_var(tc, "srcdir"));
+ testdir = opendir_fd(atf_tc_get_config_var(tc, "srcdir"));
ATF_REQUIRE(testdir >= 0);
binaryfd = openat(testdir, TARGET_ELF_NAME, O_RDONLY);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 12, 5:29 PM (17 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25222166
Default Alt Text
D31038.diff (1 KB)
Attached To
Mode
D31038: rtld/tests: Avoid function name conflict with libc opendir()
Attached
Detach File
Event Timeline
Log In to Comment