X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=http.c;h=2e3d6493ef40e1b34fea8d166d760f0b1fcccafc;hb=5ffd3113d4109ae5d3595425af3ff4a781617631;hp=2fc55d671e2e8c5302eaf140f5ecff0b1d701cef;hpb=03a39a91842cf745e5fc27dbd6485aad44d839a4;p=git.git diff --git a/http.c b/http.c index 2fc55d671..2e3d6493e 100644 --- a/http.c +++ b/http.c @@ -44,6 +44,25 @@ size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, void *buffer_) return size; } +#ifndef NO_CURL_IOCTL +curlioerr ioctl_buffer(CURL *handle, int cmd, void *clientp) +{ + struct buffer *buffer = clientp; + + switch (cmd) { + case CURLIOCMD_NOP: + return CURLIOE_OK; + + case CURLIOCMD_RESTARTREAD: + buffer->posn = 0; + return CURLIOE_OK; + + default: + return CURLIOE_UNKNOWNCMD; + } +} +#endif + size_t fwrite_buffer(const void *ptr, size_t eltsize, size_t nmemb, void *buffer_) { size_t size = eltsize * nmemb;