Author: bonefish Date: 2010-07-05 18:48:44 +0200 (Mon, 05 Jul 2010) New Revision: 37405 Changeset: http://dev.haiku-os.org/changeset/37405/haiku Modified: haiku/trunk/src/add-ons/kernel/file_systems/userlandfs/server/haiku/haiku_kernel_emu.cpp Log: Added a bit of stuff referenced by inline functions in private kernel headers. GCC 2 has the unpleasant habit of actually linking the unused inline functions in. That doesn't suffice to build the userlandfs server with debug info (it would be the wrong file anyway), but allows to build checksumfs. Modified: haiku/trunk/src/add-ons/kernel/file_systems/userlandfs/server/haiku/haiku_kernel_emu.cpp =================================================================== --- haiku/trunk/src/add-ons/kernel/file_systems/userlandfs/server/haiku/haiku_kernel_emu.cpp 2010-07-05 16:11:43 UTC (rev 37404) +++ haiku/trunk/src/add-ons/kernel/file_systems/userlandfs/server/haiku/haiku_kernel_emu.cpp 2010-07-05 16:48:44 UTC (rev 37405) @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxxx + * Copyright 2009-2010, Ingo Weinhold, ingo_weinhold@xxxxxxx * Distributed under the terms of the MIT License. */ @@ -29,6 +29,28 @@ #include "vfs.h" +// When GCC 2 compiles inline functions in debug mode, it doesn't throw away +// the generated non-inlined functions, if they aren't used. So we have to +// provide the dependencies referenced by inline functions in private kernel +// headers. +#if __GNUC__ == 2 + +#include <cpu.h> +#include <smp.h> + +cpu_ent gCPU[1]; + + +int32 +smp_get_current_cpu(void) +{ + return 0; +} + + +#endif // __GNUC__ == 2 + + // #pragma mark - Notifications