- fix build on Debian systems where access to Curl_* functions is prohibited
[m6w6/ext-http] / http_request_object.c
index d90803db8ce87cdda5b273dd53d68b4b5202075f..40e36bc61586bdd986fe959e6bc16944958688e6 100644 (file)
@@ -234,10 +234,12 @@ HTTP_BEGIN_ARGS(methodExists, 1)
        HTTP_ARG_VAL(method, 0)
 HTTP_END_ARGS;
 
+#ifdef HAVE_CURL_GETFORMDATA
 HTTP_BEGIN_ARGS(encodeBody, 2)
        HTTP_ARG_VAL(fields, 0)
        HTTP_ARG_VAL(files, 0)
 HTTP_END_ARGS;
+#endif
 
 #define OBJ_PROP_CE http_request_object_ce
 zend_class_entry *http_request_object_ce;
@@ -323,9 +325,9 @@ zend_function_entry http_request_object_fe[] = {
        HTTP_REQUEST_ALIAS(methodUnregister, http_request_method_unregister)
        HTTP_REQUEST_ALIAS(methodName, http_request_method_name)
        HTTP_REQUEST_ALIAS(methodExists, http_request_method_exists)
-       
+#if HAVE_CURL_GETFORMDATA
        HTTP_REQUEST_ALIAS(encodeBody, http_request_body_encode)
-
+#endif
        EMPTY_FUNCTION_ENTRY
 };
 static zend_object_handlers http_request_object_handlers;