just include fcntl.h not sys/fcntl.h
[oweals/busybox.git] / archival / libunarchive / seek_by_char.c
1 /* vi:set ts=4:*/
2 /*
3  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
4  */
5
6 #include <stdlib.h>
7
8 #include "unarchive.h"
9 #include "libbb.h"
10
11
12
13 /*      If we are reading through a pipe(), or from stdin then we cant lseek,
14  *  we must read and discard the data to skip over it.
15  *
16  *  TODO: rename to seek_by_read
17  */
18 void seek_by_char(const archive_handle_t *archive_handle, const unsigned int jump_size)
19 {
20         if (jump_size) {
21                 bb_copyfd_size(archive_handle->src_fd, -1, jump_size);
22         }
23 }