AT_RESOLVE_BENEATH is bsd-specific
(cherry picked from commit d51b4b0aac43d9d25f7eb3f17b2d3034a5c851d8)