diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-23 16:07:38 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-23 16:07:38 +0100 |
commit | f6afde3c5dcece3b4980cebcde09a9ecca9e20d8 (patch) | |
tree | 48294a30843b08709d6c2dbdc1734a14e176c865 | |
parent | dd4d7e713290d9cecbebc6933e41d027bac63c8f (diff) |
Move some unix header inclusions to compat.h
In most cases, including unistd.h and fcntl.h was a left over anyway.
In the cases where it was not, move it to compat.h.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r-- | difftool/sqfsdiff.h | 2 | ||||
-rw-r--r-- | include/compat.h | 2 | ||||
-rw-r--r-- | lib/common/data_reader_dump.c | 1 | ||||
-rw-r--r-- | lib/common/io_stdin.c | 1 | ||||
-rw-r--r-- | lib/sqfs/meta_reader.c | 1 | ||||
-rw-r--r-- | lib/sqfs/meta_writer.c | 1 | ||||
-rw-r--r-- | lib/sqfs/super.c | 1 | ||||
-rw-r--r-- | lib/tar/read_retry.c | 1 | ||||
-rw-r--r-- | lib/tar/write_retry.c | 1 | ||||
-rw-r--r-- | mkfs/mkfs.h | 2 | ||||
-rw-r--r-- | tar/sqfs2tar.c | 1 | ||||
-rw-r--r-- | tar/tar2sqfs.c | 1 | ||||
-rw-r--r-- | tests/str_table.c | 1 | ||||
-rw-r--r-- | tests/tar_fuzz.c | 2 | ||||
-rw-r--r-- | tests/tar_gnu.c | 2 | ||||
-rw-r--r-- | tests/tar_pax.c | 2 | ||||
-rw-r--r-- | tests/tar_sparse_gnu.c | 2 | ||||
-rw-r--r-- | tests/tar_sparse_gnu1.c | 2 | ||||
-rw-r--r-- | tests/tar_sparse_gnu2.c | 2 | ||||
-rw-r--r-- | tests/tar_ustar.c | 2 | ||||
-rw-r--r-- | tests/tar_xattr_bsd.c | 2 | ||||
-rw-r--r-- | tests/tar_xattr_schily.c | 2 | ||||
-rw-r--r-- | unpack/rdsquashfs.h | 2 |
23 files changed, 2 insertions, 34 deletions
diff --git a/difftool/sqfsdiff.h b/difftool/sqfsdiff.h index 173b927..dc94687 100644 --- a/difftool/sqfsdiff.h +++ b/difftool/sqfsdiff.h @@ -12,12 +12,10 @@ #include "fstree.h" #include "util/util.h" -#include <unistd.h> #include <stdlib.h> #include <getopt.h> #include <string.h> #include <errno.h> -#include <fcntl.h> #define MAX_WINDOW_SIZE (1024 * 1024 * 4) diff --git a/include/compat.h b/include/compat.h index 53c2e93..1a8f3a4 100644 --- a/include/compat.h +++ b/include/compat.h @@ -108,6 +108,8 @@ int fchmodat(int dirfd, const char *path, int mode, int flags); #else #include <sys/types.h> #include <sys/stat.h> +#include <unistd.h> +#include <fcntl.h> #ifdef __linux__ #include <sys/sysmacros.h> diff --git a/lib/common/data_reader_dump.c b/lib/common/data_reader_dump.c index 4065677..96103ce 100644 --- a/lib/common/data_reader_dump.c +++ b/lib/common/data_reader_dump.c @@ -7,7 +7,6 @@ #include "common.h" #include <stdlib.h> -#include <unistd.h> #include <string.h> #include <stdio.h> #include <errno.h> diff --git a/lib/common/io_stdin.c b/lib/common/io_stdin.c index 7abcd79..ca6bf49 100644 --- a/lib/common/io_stdin.c +++ b/lib/common/io_stdin.c @@ -7,7 +7,6 @@ #include "common.h" #include <stdlib.h> -#include <unistd.h> #include <string.h> #include <errno.h> diff --git a/lib/sqfs/meta_reader.c b/lib/sqfs/meta_reader.c index e8a17ad..0b8b33a 100644 --- a/lib/sqfs/meta_reader.c +++ b/lib/sqfs/meta_reader.c @@ -15,7 +15,6 @@ #include "util/util.h" #include <stdlib.h> -#include <unistd.h> #include <string.h> struct sqfs_meta_reader_t { diff --git a/lib/sqfs/meta_writer.c b/lib/sqfs/meta_writer.c index ee92b3b..cdd34e8 100644 --- a/lib/sqfs/meta_writer.c +++ b/lib/sqfs/meta_writer.c @@ -16,7 +16,6 @@ #include <string.h> #include <stdlib.h> -#include <unistd.h> typedef struct meta_block_t { struct meta_block_t *next; diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c index 15b185d..18a6736 100644 --- a/lib/sqfs/super.c +++ b/lib/sqfs/super.c @@ -13,7 +13,6 @@ #include "util/util.h" #include <string.h> -#include <unistd.h> int sqfs_super_init(sqfs_super_t *super, size_t block_size, sqfs_u32 mtime, E_SQFS_COMPRESSOR compressor) diff --git a/lib/tar/read_retry.c b/lib/tar/read_retry.c index f81c52a..c76e5e5 100644 --- a/lib/tar/read_retry.c +++ b/lib/tar/read_retry.c @@ -6,7 +6,6 @@ */ #include "config.h" -#include <unistd.h> #include <errno.h> #include <stdio.h> diff --git a/lib/tar/write_retry.c b/lib/tar/write_retry.c index 3977db1..f4f3166 100644 --- a/lib/tar/write_retry.c +++ b/lib/tar/write_retry.c @@ -6,7 +6,6 @@ */ #include "config.h" -#include <unistd.h> #include <errno.h> #include <stdio.h> diff --git a/mkfs/mkfs.h b/mkfs/mkfs.h index d89302c..4833267 100644 --- a/mkfs/mkfs.h +++ b/mkfs/mkfs.h @@ -24,13 +24,11 @@ #include <getopt.h> #include <assert.h> -#include <unistd.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <dirent.h> #include <stdio.h> -#include <fcntl.h> #include <errno.h> #include <ctype.h> diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c index 3182439..77f4843 100644 --- a/tar/sqfs2tar.c +++ b/tar/sqfs2tar.c @@ -11,7 +11,6 @@ #include <getopt.h> #include <string.h> #include <stdlib.h> -#include <unistd.h> #include <assert.h> #include <errno.h> #include <fcntl.h> diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c index 69ac5cf..10bb091 100644 --- a/tar/tar2sqfs.c +++ b/tar/tar2sqfs.c @@ -10,7 +10,6 @@ #include <stdlib.h> #include <getopt.h> -#include <unistd.h> #include <string.h> #include <stdio.h> #include <fcntl.h> diff --git a/tests/str_table.c b/tests/str_table.c index e4ac7a8..df4ca29 100644 --- a/tests/str_table.c +++ b/tests/str_table.c @@ -8,7 +8,6 @@ #include <stdlib.h> #include <assert.h> -#include <unistd.h> #include <string.h> #include <stdio.h> diff --git a/tests/tar_fuzz.c b/tests/tar_fuzz.c index 1a51da4..1284bde 100644 --- a/tests/tar_fuzz.c +++ b/tests/tar_fuzz.c @@ -9,10 +9,8 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <stdlib.h> #include <stdio.h> -#include <fcntl.h> int main(int argc, char **argv) { diff --git a/tests/tar_gnu.c b/tests/tar_gnu.c index 43ebccf..3df2855 100644 --- a/tests/tar_gnu.c +++ b/tests/tar_gnu.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_pax.c b/tests/tar_pax.c index 475a7f1..50a6bf9 100644 --- a/tests/tar_pax.c +++ b/tests/tar_pax.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_sparse_gnu.c b/tests/tar_sparse_gnu.c index b67171d..8776a09 100644 --- a/tests/tar_sparse_gnu.c +++ b/tests/tar_sparse_gnu.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_sparse_gnu1.c b/tests/tar_sparse_gnu1.c index a9d90d4..4a2c2b9 100644 --- a/tests/tar_sparse_gnu1.c +++ b/tests/tar_sparse_gnu1.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_sparse_gnu2.c b/tests/tar_sparse_gnu2.c index 6402c87..57508f8 100644 --- a/tests/tar_sparse_gnu2.c +++ b/tests/tar_sparse_gnu2.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_ustar.c b/tests/tar_ustar.c index 8b9b453..d2b89f8 100644 --- a/tests/tar_ustar.c +++ b/tests/tar_ustar.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_xattr_bsd.c b/tests/tar_xattr_bsd.c index 9a7eab2..39a73cc 100644 --- a/tests/tar_xattr_bsd.c +++ b/tests/tar_xattr_bsd.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/tests/tar_xattr_schily.c b/tests/tar_xattr_schily.c index 7434a41..ba5bb2d 100644 --- a/tests/tar_xattr_schily.c +++ b/tests/tar_xattr_schily.c @@ -9,11 +9,9 @@ #include "util/util.h" #include "tar.h" -#include <unistd.h> #include <assert.h> #include <stdlib.h> #include <string.h> -#include <fcntl.h> #include <stdio.h> #define STR(x) #x diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h index 9e21050..7a9f242 100644 --- a/unpack/rdsquashfs.h +++ b/unpack/rdsquashfs.h @@ -21,12 +21,10 @@ #endif #include <string.h> #include <stdlib.h> -#include <unistd.h> #include <getopt.h> #include <assert.h> #include <ctype.h> #include <errno.h> -#include <fcntl.h> #include <stdio.h> enum UNPACK_FLAGS { |