I think you can just move the declaration of `fname` inside the `#if`. Then you won't need `fname_tmp`.