Fix resolve for ip. Fix compile for libevent2