diff --git a/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile b/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile index 577a958ac2..ddb32a2f29 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile +++ b/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile @@ -50,10 +50,15 @@ SetupIncludes ; malloc_debug_flags = -fcheck-memory-usage ; } - # We need to use a wrapper for fstat() on non-BeOS systems. - local buildPlatformFstatDefines ; + # We need to use a wrapper for some POSIX calls on non-BeOS systems. + local buildPlatformDefines ; if $(OS) != BEOS { - buildPlatformFstatDefines = build_platform_fstat=fs_shell_fstat ; + buildPlatformDefines = + open=build_platform_open + close=build_platform_close + fstat=build_platform_fstat + read_pos=build_platform_read_pos + ; } local defines = [ FDefines USER @@ -62,7 +67,7 @@ SetupIncludes ; UNSAFE_GET_VNODE #BFS_BIG_ENDIAN_ONLY $(malloc_debug_defines) - $(buildPlatformFstatDefines) + $(buildPlatformDefines) ] ; SubDirCcFlags $(defines) $(malloc_debug_flags) ; SubDirC++Flags $(defines) -fno-exceptions -fno-rtti $(malloc_debug_flags) diff --git a/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp b/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp index 8d64a717a4..799a0f8c83 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp +++ b/src/tests/add-ons/kernel/file_systems/bfs/r5/Volume.cpp @@ -21,13 +21,6 @@ #include #include -// fs_shell support for build platforms whose struct stat is not compatible with ours -#ifdef build_platform_fstat -extern "C" int build_platform_fstat(int fd, struct stat *st); -#else -# define build_platform_fstat fstat -#endif - static const int32 kDesiredAllocationGroups = 56; // This is the number of allocation groups that will be tried @@ -129,7 +122,7 @@ DeviceOpener::GetSize(off_t *_size, uint32 *_blockSize) if (ioctl(fDevice, B_GET_GEOMETRY, &geometry) < 0) { // maybe it's just a file struct stat stat; - if (build_platform_fstat(fDevice, &stat) < 0) + if (fstat(fDevice, &stat) < 0) return B_ERROR; if (_size) @@ -295,7 +288,7 @@ Volume::Mount(const char *deviceName, uint32 flags) // check if it's a regular file, and if so, disable the cache for the // underlaying file system struct stat stat; - if (build_platform_fstat(fDevice, &stat) < 0) + if (fstat(fDevice, &stat) < 0) RETURN_ERROR(B_ERROR); #ifndef NO_FILE_UNCACHED_IO