libc: print extended errors from warn(3) and vwarn(3)
(cherry picked from commit ffbf95907039821b69dfe1607d1695b46af82e35)