--- a/hooks/apr_hooks.c
+++ b/hooks/apr_hooks.c
@@ -377,7 +377,7 @@
 #endif
     if(!s_phOptionalFunctions)
         return NULL;
-    return (void(*)(void))apr_hash_get(s_phOptionalFunctions,szName,strlen(szName));
+    return (void(__stdcall *)(void))apr_hash_get(s_phOptionalFunctions,szName,strlen(szName));
 }
 
 /* Deprecated */
