aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 22:54:44 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 22:54:44 +0200
commitba4811b1d2ac5a9d363e6000c83098f2eb885119 (patch)
tree776184456b7a9181cd29bf23e0e214e5a67dd462 /lib
parent2f1b5d44343aac079af2671e97aa3ffd5c7e4b66 (diff)
Add a header for platform compatibillity fluff
- We don't have "endian.h" everywhere. On some BSDs its in sys and on some BSDs the macros have different names. - We definitely don't have sysmacros.h on non-Unix-like systems. - Likewise for sys/types.h, sys/stat.h and their contents. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/fstree/fstree_from_dir.c1
-rw-r--r--lib/fstree/fstree_from_file.c2
-rw-r--r--lib/sqfs/dir_writer.c2
-rw-r--r--lib/sqfs/id_table.c1
-rw-r--r--lib/sqfs/read_inode.c1
-rw-r--r--lib/sqfs/read_super.c1
-rw-r--r--lib/sqfs/read_table.c1
-rw-r--r--lib/sqfs/readdir.c1
-rw-r--r--lib/sqfs/super.c1
-rw-r--r--lib/sqfs/write_inode.c1
-rw-r--r--lib/sqfs/write_table.c1
-rw-r--r--lib/sqfshelper/tree_node_to_inode.c1
-rw-r--r--lib/tar/internal.h1
-rw-r--r--lib/util/Makemodule.am2
-rw-r--r--lib/util/dirstack.c2
-rw-r--r--lib/util/mkdir_p.c2
16 files changed, 4 insertions, 17 deletions
diff --git a/lib/fstree/fstree_from_dir.c b/lib/fstree/fstree_from_dir.c
index c31b1a0..d68fafa 100644
--- a/lib/fstree/fstree_from_dir.c
+++ b/lib/fstree/fstree_from_dir.c
@@ -9,7 +9,6 @@
#include "fstree.h"
#include "util.h"
-#include <sys/types.h>
#ifdef HAVE_SYS_XATTR_H
#include <sys/xattr.h>
#endif
diff --git a/lib/fstree/fstree_from_file.c b/lib/fstree/fstree_from_file.c
index 619e83f..ec2f941 100644
--- a/lib/fstree/fstree_from_file.c
+++ b/lib/fstree/fstree_from_file.c
@@ -9,8 +9,6 @@
#include "fstree.h"
#include "util.h"
-#include <sys/sysmacros.h>
-#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c
index 2efc10d..3598dd2 100644
--- a/lib/sqfs/dir_writer.c
+++ b/lib/sqfs/dir_writer.c
@@ -15,8 +15,6 @@
#include "sqfs/dir.h"
#include "util.h"
-#include <sys/stat.h>
-#include <endian.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/sqfs/id_table.c b/lib/sqfs/id_table.c
index 78a5d26..a320eca 100644
--- a/lib/sqfs/id_table.c
+++ b/lib/sqfs/id_table.c
@@ -11,6 +11,7 @@
#include "sqfs/super.h"
#include "sqfs/table.h"
#include "sqfs/error.h"
+#include "compat.h"
#include <stdlib.h>
#include <string.h>
diff --git a/lib/sqfs/read_inode.c b/lib/sqfs/read_inode.c
index 1916c96..51662eb 100644
--- a/lib/sqfs/read_inode.c
+++ b/lib/sqfs/read_inode.c
@@ -13,7 +13,6 @@
#include "sqfs/inode.h"
#include "util.h"
-#include <sys/stat.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/lib/sqfs/read_super.c b/lib/sqfs/read_super.c
index b2f363a..6ac2ac4 100644
--- a/lib/sqfs/read_super.c
+++ b/lib/sqfs/read_super.c
@@ -12,7 +12,6 @@
#include "sqfs/io.h"
#include "util.h"
-#include <endian.h>
#include <string.h>
int sqfs_super_read(sqfs_super_t *super, sqfs_file_t *file)
diff --git a/lib/sqfs/read_table.c b/lib/sqfs/read_table.c
index 4c5a5cc..096ac1a 100644
--- a/lib/sqfs/read_table.c
+++ b/lib/sqfs/read_table.c
@@ -14,7 +14,6 @@
#include "sqfs/io.h"
#include "util.h"
-#include <endian.h>
#include <stdlib.h>
int sqfs_read_table(sqfs_file_t *file, sqfs_compressor_t *cmp,
diff --git a/lib/sqfs/readdir.c b/lib/sqfs/readdir.c
index 6b549b7..8899475 100644
--- a/lib/sqfs/readdir.c
+++ b/lib/sqfs/readdir.c
@@ -10,6 +10,7 @@
#include "sqfs/meta_reader.h"
#include "sqfs/error.h"
#include "sqfs/dir.h"
+#include "compat.h"
#include <stdlib.h>
#include <string.h>
diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c
index 5cd5a87..8e39b55 100644
--- a/lib/sqfs/super.c
+++ b/lib/sqfs/super.c
@@ -12,7 +12,6 @@
#include "sqfs/io.h"
#include "util.h"
-#include <endian.h>
#include <string.h>
#include <unistd.h>
diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c
index b16ef65..debaa00 100644
--- a/lib/sqfs/write_inode.c
+++ b/lib/sqfs/write_inode.c
@@ -10,6 +10,7 @@
#include "sqfs/meta_writer.h"
#include "sqfs/error.h"
#include "sqfs/inode.h"
+#include "compat.h"
static int write_block_sizes(sqfs_meta_writer_t *ir,
const sqfs_inode_generic_t *n)
diff --git a/lib/sqfs/write_table.c b/lib/sqfs/write_table.c
index c50cf06..1931b83 100644
--- a/lib/sqfs/write_table.c
+++ b/lib/sqfs/write_table.c
@@ -15,7 +15,6 @@
#include "sqfs/io.h"
#include "util.h"
-#include <endian.h>
#include <stdlib.h>
int sqfs_write_table(sqfs_file_t *file, sqfs_compressor_t *cmp,
diff --git a/lib/sqfshelper/tree_node_to_inode.c b/lib/sqfshelper/tree_node_to_inode.c
index 62a804d..d75e959 100644
--- a/lib/sqfshelper/tree_node_to_inode.c
+++ b/lib/sqfshelper/tree_node_to_inode.c
@@ -12,7 +12,6 @@
#include "util.h"
#include <assert.h>
-#include <endian.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/tar/internal.h b/lib/tar/internal.h
index f30de29..435cb73 100644
--- a/lib/tar/internal.h
+++ b/lib/tar/internal.h
@@ -12,7 +12,6 @@
#include "util.h"
#include "tar.h"
-#include <sys/sysmacros.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/lib/util/Makemodule.am b/lib/util/Makemodule.am
index 1d77fd5..58333ac 100644
--- a/lib/util/Makemodule.am
+++ b/lib/util/Makemodule.am
@@ -1,6 +1,6 @@
libutil_la_SOURCES = lib/util/write_data.c
libutil_la_SOURCES += lib/util/read_data.c include/util.h
-libutil_la_SOURCES += lib/util/mkdir_p.c
+libutil_la_SOURCES += lib/util/mkdir_p.c include/compat.h
libutil_la_SOURCES += lib/util/str_table.c include/str_table.h
libutil_la_SOURCES += lib/util/dirstack.c lib/util/padd_file.c
libutil_la_SOURCES += lib/util/alloc.c
diff --git a/lib/util/dirstack.c b/lib/util/dirstack.c
index 8f7baf1..20a89cc 100644
--- a/lib/util/dirstack.c
+++ b/lib/util/dirstack.c
@@ -6,8 +6,6 @@
*/
#include "config.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/lib/util/mkdir_p.c b/lib/util/mkdir_p.c
index f9d7730..93d0f59 100644
--- a/lib/util/mkdir_p.c
+++ b/lib/util/mkdir_p.c
@@ -6,8 +6,6 @@
*/
#include "config.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <string.h>
#include <alloca.h>
#include <stdio.h>