diff --git a/httpd.h b/httpd.h index d607860..36f2a1b 100644 --- a/httpd.h +++ b/httpd.h @@ -192,7 +192,7 @@ static void inline close_on_exec(int fd) #ifdef USE_SSL extern int ssl_read(struct REQUEST *req, char *buf, int len); extern int ssl_write(struct REQUEST *req, char *buf, int len); -extern int ssl_blk_write(struct REQUEST *req, int offset, int len); +extern int ssl_blk_write(struct REQUEST *req, off_t offset, size_t len); extern void init_ssl(void); extern void open_ssl_session(struct REQUEST *req); #endif diff --git a/ssl.c b/ssl.c index 9a3051c..9c4e2fb 100644 --- a/ssl.c +++ b/ssl.c @@ -64,15 +64,14 @@ int ssl_write(struct REQUEST *req, char *buf, int len) return rc; } -int ssl_blk_write(struct REQUEST *req, int offset, int len) +int ssl_blk_write(struct REQUEST *req, off_t offset, size_t len) { int rc; char buf[4096]; if (lseek(req->bfd, offset, SEEK_SET) == -1) { - if (debug) - perror("lseek"); - return -1; + if (debug) perror("lseek"); + return -1; } if (len > sizeof(buf))