Files in fs/hfs and fs/hfsplus have same names, this causes problems during linkage.
That sounds like a bug in the build system. Can you fix that instead? That would actually fix it, your patch is just an ugly band-aid :-(
As investigated previously, the problem occurs when the libfs.a library already exists and one of its source files changes. It seems like `ar' tries to do an incremental update of object files and gets confused about the identically named files within the archive, symptoms are missing (or duplicate?) symbols.
Sounds to me like the real problem is with how ar is used, then? Can you show the ar commands that fail?