aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h4
-rw-r--r--include/compat.h6
-rw-r--r--include/tar.h2
-rw-r--r--include/util/util.h21
4 files changed, 8 insertions, 25 deletions
diff --git a/include/common.h b/include/common.h
index 66f6f76..cdcce39 100644
--- a/include/common.h
+++ b/include/common.h
@@ -26,7 +26,6 @@
#include "sqfs/dir.h"
#include "sqfs/io.h"
-#include "util/util.h"
#include "compat.h"
#include "fstree.h"
#include "tar.h"
@@ -73,6 +72,9 @@ typedef struct {
bool quiet;
} sqfs_writer_cfg_t;
+#define container_of(ptr, type, member) \
+ ((type *)((char *)ptr - offsetof(type, member)))
+
/*
High level helper function to serialize an entire file system tree to
a squashfs inode table and directory table.
diff --git a/include/compat.h b/include/compat.h
index 82b1c7e..9051d88 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -1,12 +1,14 @@
-/* SPDX-License-Identifier: LGPL-3.0-or-later */
+/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
- * util.h
+ * compat.h
*
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
#ifndef COMPAT_H
#define COMPAT_H
+#include "sqfs/predef.h"
+
#if defined(__GNUC__) || defined(__clang__)
# if defined(__GNUC__) && __GNUC__ < 5
# if SIZEOF_SIZE_T <= SIZEOF_INT
diff --git a/include/tar.h b/include/tar.h
index dacea42..c496095 100644
--- a/include/tar.h
+++ b/include/tar.h
@@ -8,7 +8,7 @@
#define TAR_H
#include "config.h"
-#include "util/util.h"
+#include "compat.h"
#include <stdbool.h>
#include <stdint.h>
diff --git a/include/util/util.h b/include/util/util.h
deleted file mode 100644
index ed1102b..0000000
--- a/include/util/util.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: LGPL-3.0-or-later */
-/*
- * util.h
- *
- * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
- */
-#ifndef UTIL_H
-#define UTIL_H
-
-#include "config.h"
-#include "sqfs/predef.h"
-
-#include <stdint.h>
-#include <stddef.h>
-
-#include "compat.h"
-
-#define container_of(ptr, type, member) \
- ((type *)((char *)ptr - offsetof(type, member)))
-
-#endif /* UTIL_H */