Why do this? Why not just actually set the __POSIX_VISIBLE macro in the appropriate builds to declare that you want that support? This hack seems well, rather hacky and not really worth it.