aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-25 13:28:28 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-25 13:28:28 +0100
commit94b547d27f953fefa0ed080611eb916f58702e87 (patch)
tree2f6cce57154b494d0c26588421a979f64c635b9b /include
parentfc9a644002dc501a5c224e5cc1a7dfba3ca2d1d8 (diff)
Cleanup: remove what is left of libutil
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
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 */