From 05a30292f9d2be63af3b4c27d5ae89801da602a2 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 23 Jul 2019 13:48:29 -0700 Subject: 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 Signed-off-by: David Oberhollenzer --- unpack/describe.c | 2 ++ unpack/list_files.c | 2 ++ unpack/options.c | 2 ++ unpack/rdsquashfs.c | 2 ++ unpack/rdsquashfs.h | 3 ++- unpack/restore_fstree.c | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) (limited to 'unpack') diff --git a/unpack/describe.c b/unpack/describe.c index 94e7d22..cf5befd 100644 --- a/unpack/describe.c +++ b/unpack/describe.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "rdsquashfs.h" #include diff --git a/unpack/list_files.c b/unpack/list_files.c index b9bb161..4038684 100644 --- a/unpack/list_files.c +++ b/unpack/list_files.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "rdsquashfs.h" #include diff --git a/unpack/options.c b/unpack/options.c index c42f16a..0f0660e 100644 --- a/unpack/options.c +++ b/unpack/options.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "rdsquashfs.h" static struct option long_opts[] = { diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c index 4a0f12b..2996668 100644 --- a/unpack/rdsquashfs.c +++ b/unpack/rdsquashfs.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "rdsquashfs.h" int main(int argc, char **argv) diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h index 0ee48fa..aa051a2 100644 --- a/unpack/rdsquashfs.h +++ b/unpack/rdsquashfs.h @@ -2,6 +2,8 @@ #ifndef RDSQUASHFS_H #define RDSQUASHFS_H +#include "config.h" + #include "meta_reader.h" #include "data_reader.h" #include "highlevel.h" @@ -9,7 +11,6 @@ #include "compress.h" #include "id_table.h" #include "fstree.h" -#include "config.h" #include "util.h" #include diff --git a/unpack/restore_fstree.c b/unpack/restore_fstree.c index 455e604..8fb04d7 100644 --- a/unpack/restore_fstree.c +++ b/unpack/restore_fstree.c @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ +#include "config.h" + #include "rdsquashfs.h" static int create_node(tree_node_t *n, data_reader_t *data, int flags) -- cgit v1.2.3