aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/src/tool_cb_see.c
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-11-11 22:28:44 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-11-11 22:43:33 +0300
commit175ec788d14db88a2fafb920c8b5117209c12d5b (patch)
tree5ff4a7d314ce3887c5df8f051d83866edd585ac1 /contrib/libs/curl/src/tool_cb_see.c
parentb6c20a8a26d0be34045f2604b4da1ee189920ed2 (diff)
downloadydb-175ec788d14db88a2fafb920c8b5117209c12d5b.tar.gz
Update contrib/libs/curl to 8.2.1
Diffstat (limited to 'contrib/libs/curl/src/tool_cb_see.c')
-rw-r--r--contrib/libs/curl/src/tool_cb_see.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/libs/curl/src/tool_cb_see.c b/contrib/libs/curl/src/tool_cb_see.c
index d24d526518..8351473c82 100644
--- a/contrib/libs/curl/src/tool_cb_see.c
+++ b/contrib/libs/curl/src/tool_cb_see.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -28,6 +28,7 @@
#include "curlx.h"
#include "tool_cfgable.h"
+#include "tool_operate.h"
#include "tool_cb_see.h"
#include "memdebug.h" /* keep this as LAST include */
@@ -48,7 +49,7 @@
int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
{
- struct InStruct *in = userdata;
+ struct per_transfer *per = userdata;
#if(SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
@@ -66,13 +67,13 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
/* this code path doesn't support other types */
return CURL_SEEKFUNC_FAIL;
- if(LSEEK_ERROR == lseek(in->fd, 0, SEEK_SET))
+ if(LSEEK_ERROR == lseek(per->infd, 0, SEEK_SET))
/* couldn't rewind to beginning */
return CURL_SEEKFUNC_FAIL;
while(left) {
long step = (left > OUR_MAX_SEEK_O) ? OUR_MAX_SEEK_L : (long)left;
- if(LSEEK_ERROR == lseek(in->fd, step, SEEK_CUR))
+ if(LSEEK_ERROR == lseek(per->infd, step, SEEK_CUR))
/* couldn't seek forwards the desired amount */
return CURL_SEEKFUNC_FAIL;
left -= step;
@@ -81,7 +82,7 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
}
#endif
- if(LSEEK_ERROR == lseek(in->fd, offset, whence))
+ if(LSEEK_ERROR == lseek(per->infd, offset, whence))
/* couldn't rewind, the reason is in errno but errno is just not portable
enough and we don't actually care that much why we failed. We'll let
libcurl know that it may try other means if it wants to. */