From 91e8aafc8259115b7fff81d46bee82bca036526e Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 21 Nov 2022 14:25:39 +0100 Subject: Make some string functions from libcompat available to libsquashfs Signed-off-by: David Oberhollenzer --- COPYING.md | 3 +++ lib/compat/strchrnul.c | 6 ++++++ lib/compat/strndup.c | 2 +- lib/sqfs/Makemodule.am | 4 ++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/COPYING.md b/COPYING.md index 574aad6..e83e986 100644 --- a/COPYING.md +++ b/COPYING.md @@ -28,6 +28,9 @@ The components copied from Musl libc are subejct to an MIT style license. See `liceneses/musl.txt` for details and only compiled into executable programs if the target system does not provide an implementation. +Some additional components of `lib/compat` are also LGPL licensed, to allow +their inclusion in `libsquashfs`. See SPDX identifiers. + Copies of the LGPLv3 and GPLv3 are included in `licenses/LGPLv3.txt` and `licenses/GPLv3.txt` respectively. diff --git a/lib/compat/strchrnul.c b/lib/compat/strchrnul.c index 681b287..7296060 100644 --- a/lib/compat/strchrnul.c +++ b/lib/compat/strchrnul.c @@ -1,3 +1,9 @@ +/* SPDX-License-Identifier: LGPL-3.0-or-later */ +/* + * strchrnul.c + * + * Copyright (C) 2019 David Oberhollenzer + */ #include "config.h" #include "compat.h" diff --git a/lib/compat/strndup.c b/lib/compat/strndup.c index dff79d7..7e77f6c 100644 --- a/lib/compat/strndup.c +++ b/lib/compat/strndup.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* SPDX-License-Identifier: LGPL-3.0-or-later */ /* * strndup.c * diff --git a/lib/sqfs/Makemodule.am b/lib/sqfs/Makemodule.am index b1c9d94..40a543d 100644 --- a/lib/sqfs/Makemodule.am +++ b/lib/sqfs/Makemodule.am @@ -51,6 +51,10 @@ libsquashfs_la_SOURCES += lib/util/array.c include/util/array.h libsquashfs_la_SOURCES += lib/util/is_memory_zero.c libsquashfs_la_SOURCES += include/util/threadpool.h +# and from libcompat +libsquashfs_la_SOURCES += lib/compat/strchrnul.c lib/compat/strndup.c +libsquashfs_la_SOURCES += include/compat.h + if CUSTOM_ALLOC libsquashfs_la_SOURCES += lib/util/mempool.c include/util/mempool.h endif -- cgit v1.2.3