fix C++ cast problem on make_eap