--- a/crypto/wvx509.cc
+++ b/crypto/wvx509.cc
@@ -1157,7 +1157,7 @@
         
         if (ext)
         {
-            X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
+            X509V3_EXT_METHOD *method = (X509V3_EXT_METHOD *)X509V3_EXT_get(ext);
             if (!method)
             {
                 WvDynBuf buf;
