summaryrefslogtreecommitdiff
path: root/lib/tar
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2019-07-23 13:48:29 -0700
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-24 09:16:16 +0200
commit05a30292f9d2be63af3b4c27d5ae89801da602a2 (patch)
treef9f596d38b05889dbcb83f9df5c9bcda7dbe48c5 /lib/tar
parentd6f15cb9b054ed76b5bee2e6924d4b0b2a5e52ae (diff)
Enable largefile support
Requires that config.h be included before other headers, since the macro _FILE_OFFSET_BITS changes the definitions of things like 'struct stat'. I chose to simply include it at the top of every C file and at immediately after the double-inclusion guards of every header. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/tar')
-rw-r--r--lib/tar/base64.c2
-rw-r--r--lib/tar/checksum.c2
-rw-r--r--lib/tar/cleanup.c2
-rw-r--r--lib/tar/internal.h2
-rw-r--r--lib/tar/number.c2
-rw-r--r--lib/tar/read_header.c2
-rw-r--r--lib/tar/read_sparse_map.c2
-rw-r--r--lib/tar/read_sparse_map_old.c2
-rw-r--r--lib/tar/skip.c2
-rw-r--r--lib/tar/urldecode.c2
-rw-r--r--lib/tar/write_header.c2
11 files changed, 22 insertions, 0 deletions
diff --git a/lib/tar/base64.c b/lib/tar/base64.c
index 313e9f4..89b7afa 100644
--- a/lib/tar/base64.c
+++ b/lib/tar/base64.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
static uint8_t convert(char in)
diff --git a/lib/tar/checksum.c b/lib/tar/checksum.c
index af94ab4..b3cef88 100644
--- a/lib/tar/checksum.c
+++ b/lib/tar/checksum.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
static unsigned int get_checksum(const tar_header_t *hdr)
diff --git a/lib/tar/cleanup.c b/lib/tar/cleanup.c
index a34c28b..ed62c0a 100644
--- a/lib/tar/cleanup.c
+++ b/lib/tar/cleanup.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
void free_sparse_list(sparse_map_t *sparse)
diff --git a/lib/tar/internal.h b/lib/tar/internal.h
index 04a97d3..8a3a9c5 100644
--- a/lib/tar/internal.h
+++ b/lib/tar/internal.h
@@ -2,6 +2,8 @@
#ifndef INTERNAL_H
#define INTERNAL_H
+#include "config.h"
+
#include "util.h"
#include "tar.h"
diff --git a/lib/tar/number.c b/lib/tar/number.c
index 009a4de..f80532b 100644
--- a/lib/tar/number.c
+++ b/lib/tar/number.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
int read_octal(const char *str, int digits, uint64_t *out)
diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c
index 1769e0a..4843bb5 100644
--- a/lib/tar/read_header.c
+++ b/lib/tar/read_header.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
static bool is_zero_block(const tar_header_t *hdr)
diff --git a/lib/tar/read_sparse_map.c b/lib/tar/read_sparse_map.c
index 77876f5..a1526c4 100644
--- a/lib/tar/read_sparse_map.c
+++ b/lib/tar/read_sparse_map.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
sparse_map_t *read_sparse_map(const char *line)
diff --git a/lib/tar/read_sparse_map_old.c b/lib/tar/read_sparse_map_old.c
index 41d309a..2784640 100644
--- a/lib/tar/read_sparse_map_old.c
+++ b/lib/tar/read_sparse_map_old.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
sparse_map_t *read_gnu_old_sparse(int fd, tar_header_t *hdr)
diff --git a/lib/tar/skip.c b/lib/tar/skip.c
index 28c02be..94d3e5d 100644
--- a/lib/tar/skip.c
+++ b/lib/tar/skip.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "util.h"
#include "tar.h"
diff --git a/lib/tar/urldecode.c b/lib/tar/urldecode.c
index ac03f10..6bbecec 100644
--- a/lib/tar/urldecode.c
+++ b/lib/tar/urldecode.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
static int xdigit(int x)
diff --git a/lib/tar/write_header.c b/lib/tar/write_header.c
index caddc97..19b00bd 100644
--- a/lib/tar/write_header.c
+++ b/lib/tar/write_header.c
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
+#include "config.h"
+
#include "internal.h"
static void write_binary(char *dst, uint64_t value, int digits)