I took a look, but I'm not sure how helpful that is since I'll have to still check for __linux__ anyway because I need readlink to get the actual file's path, not the symlink in procfs.
Why do you need to check for __linux__ to use readlink()?
It also would incur an extra allocation that we can avoid on the symlink's path.
I don't think one small allocation is going to matter in a server call.