Provide an api adaption mechanism to workaround the gcc shortcommings