diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-12-29 17:18:17 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-12-29 17:18:17 +0000 |
commit | 34ce26dcc69416489a1520e18a657ea7e8771ae1 (patch) | |
tree | 82bc87f0dd3ea797592e6989aaa33538fc69bc75 /test/bbackupd | |
parent | 640786c33e71dd30c98068a7b82f8713f780d9f8 (diff) |
Compile fix for platforms without intercept capability (refs #3)
Diffstat (limited to 'test/bbackupd')
-rw-r--r-- | test/bbackupd/testbbackupd.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 8a1c711f..d1bf4a98 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -9,6 +9,7 @@ #include "Box.h" +#include <dirent.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> @@ -509,11 +510,6 @@ void do_interrupted_restore(const TLSContext &context, int64_t restoredirid) } } -void intercept_setup_delay(const char *filename, unsigned int delay_after, - int delay_ms, int syscall_to_delay, int num_delays); - -bool intercept_triggered(); - int start_internal_daemon() { // ensure that no child processes end up running tests! @@ -598,7 +594,9 @@ int lstat_test_hook(const char *file_name, struct stat *buf); struct dirent *readdir_test_hook_1(DIR *dir) { +#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE intercept_setup_readdir_hook(NULL, readdir_test_hook_2); +#endif return NULL; } @@ -609,8 +607,10 @@ struct dirent *readdir_test_hook_2(DIR *dir) { if (time(NULL) >= readdir_stop_time) { +#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE intercept_setup_readdir_hook(NULL, NULL); intercept_setup_lstat_hook (NULL, NULL); +#endif // we will not be called again. } @@ -626,7 +626,9 @@ struct dirent *readdir_test_hook_2(DIR *dir) snprintf(stat_hook_filename, sizeof(stat_hook_filename), "testfiles/TestDir1/spacetest/d1/test.%d", readdir_test_counter); +#ifndef PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE intercept_setup_lstat_hook(stat_hook_filename, lstat_test_hook); +#endif return &readdir_test_dirent; } |