Required header was indirectly getting resolved through lwip includes, apparently does not work if application is not using lwip networking stack.