Skip to content

Commit cf5a568

Browse files
committed
Remove compat hack for curl_httppost
HttpPost was renamed to curl_httppost in curl 7.9.6. Since the minimum version for PHP is 7.61.0, we can safely depend on curl_httppost. curl/curl@5799852
1 parent f745a2f commit cf5a568

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

ext/curl/interface.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
#include <curl/curl.h>
3333
#include <curl/easy.h>
3434

35-
/* As of curl 7.11.1 this is no longer defined inside curl.h */
36-
#ifndef HttpPost
37-
#define HttpPost curl_httppost
38-
#endif
39-
4035
#include "zend_smart_str.h"
4136
#include "ext/standard/info.h"
4237
#include "ext/standard/file.h"
@@ -1110,7 +1105,7 @@ void init_curl_handle(php_curl *ch)
11101105

11111106
memset(&ch->err, 0, sizeof(struct _php_curl_error));
11121107

1113-
zend_llist_init(&ch->to_free->post, sizeof(struct HttpPost *), (llist_dtor_func_t)curl_free_post, 0);
1108+
zend_llist_init(&ch->to_free->post, sizeof(struct curl_httppost *), (llist_dtor_func_t)curl_free_post, 0);
11141109
zend_llist_init(&ch->to_free->stream, sizeof(struct mime_data_cb_arg *), (llist_dtor_func_t)curl_free_cb_arg, 0);
11151110

11161111
zend_hash_init(&ch->to_free->slist, 4, NULL, curl_free_slist, 0);

0 commit comments

Comments
 (0)