aboutsummaryrefslogtreecommitdiff
path: root/include/common.h
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/common.h
parentfc9a644002dc501a5c224e5cc1a7dfba3ca2d1d8 (diff)
Cleanup: remove what is left of libutil
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h4
1 files changed, 3 insertions, 1 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.