zsync: Fix build on musl
PATCH 1/1 zsync: Fix build on musl
Signed-off-by Khem Raj <[email protected]>
Cc Ross Burton <[email protected]>
--- ...0001-sha1-Include-unistd.h-for-off_t.patch | 29 +++++++++++++++++++ meta-oe/recipes-extended/zsync/zsync_0.6.2.bb | 4 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/zsync/zsync/0001-sha1-Include-unistd.h-for-off_t.patch
meta-oe/recipes-extended/zsync/zsync/0001-sha1-Include-unistd.h-for-off_t.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 72ad6dd95441836afb1f113697339b3c694d0e69 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 8 Jun 2021 09:26:32 -0700 +Subject: [PATCH] sha1: Include unistd.h for off_t + +Musl systems do not get this definition indirectly like what happens +on glibc, therefore include unistd.h to get the definition + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + libzsync/sha1.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libzsync/sha1.h b/libzsync/sha1.h +index 3946505..23d9434 100644 +--- a/libzsync/sha1.h ++++ b/libzsync/sha1.h +@@ -16,6 +16,7 @@ + #else + #include <sys/types.h> + #endif ++#include <unistd.h> + + #define SHA1_BLOCK_LENGTH 64 + #define SHA1_DIGEST_LENGTH 20 +-- +2.32.0 +
meta-oe/recipes-extended/zsync/zsync_0.6.2.bb +3 -1
@@ -5,7 +5,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=71c0ac4d86266533509aa0825b8d323c" SRC_URI = "http://zsync.moria.org.uk/download/${BP}.tar.bz2 \ - file://out-of-tree.patch" + file://out-of-tree.patch \ + file://0001-sha1-Include-unistd.h-for-off_t.patch \ + " SRC_URI[sha256sum] = "0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2" inherit autotools
Signature · 1 line
2.32.0
I've a better patch, hold off merging that recipe.
Ross
Quoted 65 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>Cc Ross Burton <[email protected]>--- ...0001-sha1-Include-unistd.h-for-off_t.patch | 29 +++++++++++++++++++ meta-oe/recipes-extended/zsync/zsync_0.6.2.bb | 4 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/zsync/zsync/0001-sha1-Include-unistd.h-for-off_t.patchmeta-oe/recipes-extended/zsync/zsync/0001-sha1-Include-unistd.h-for-off_t.patch new file +29
-0@@ -0,0 +1,29 @@ +From 72ad6dd95441836afb1f113697339b3c694d0e69 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 8 Jun 2021 09:26:32 -0700 +Subject: [PATCH] sha1: Include unistd.h for off_t + +Musl systems do not get this definition indirectly like what happens +on glibc, therefore include unistd.h to get the definition + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + libzsync/sha1.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libzsync/sha1.h b/libzsync/sha1.h +index 3946505..23d9434 100644 +--- a/libzsync/sha1.h ++++ b/libzsync/sha1.h +@@ -16,6 +16,7 @@ + #else + #include <sys/types.h> + #endif ++#include <unistd.h> + + #define SHA1_BLOCK_LENGTH 64 + #define SHA1_DIGEST_LENGTH 20 +-- +2.32.0 +meta-oe/recipes-extended/zsync/zsync_0.6.2.bb +3
-2@@ -5,7 +5,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=71c0ac4d86266533509aa0825b8d323c" SRC_URI = "http://zsync.moria.org.uk/download/${BP}.tar.bz2 \ - file://out-of-tree.patch" + file://out-of-tree.patch \ + file://0001-sha1-Include-unistd.h-for-off_t.patch \ + " SRC_URI[sha256sum] = "0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2" inherit autotools --2.32.0
Quoted 3 lines · Ross Burton
I've a better patch, hold off merging that recipe.
ok
Quoted 68 lines
Ross
Quoted 65 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>Cc Ross Burton <[email protected]>--- ...0001-sha1-Include-unistd.h-for-off_t.patch | 29 +++++++++++++++++++ meta-oe/recipes-extended/zsync/zsync_0.6.2.bb | 4 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/zsync/zsync/0001-sha1-Include-unistd.h-for-off_t.patchmeta-oe/recipes-extended/zsync/zsync/0001-sha1-Include-unistd.h-for-off_t.patch new file +29
-0@@ -0,0 +1,29 @@ +From 72ad6dd95441836afb1f113697339b3c694d0e69 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 8 Jun 2021 09:26:32 -0700 +Subject: [PATCH] sha1: Include unistd.h for off_t + +Musl systems do not get this definition indirectly like what happens +on glibc, therefore include unistd.h to get the definition + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> +--- + libzsync/sha1.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libzsync/sha1.h b/libzsync/sha1.h +index 3946505..23d9434 100644 +--- a/libzsync/sha1.h ++++ b/libzsync/sha1.h +@@ -16,6 +16,7 @@ + #else + #include <sys/types.h> + #endif ++#include <unistd.h> + + #define SHA1_BLOCK_LENGTH 64 + #define SHA1_DIGEST_LENGTH 20 +-- +2.32.0 +meta-oe/recipes-extended/zsync/zsync_0.6.2.bb +3
-2@@ -5,7 +5,9 @@ LICENSE = "Artistic-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=71c0ac4d86266533509aa0825b8d323c" SRC_URI = "http://zsync.moria.org.uk/download/${BP}.tar.bz2 \ - file://out-of-tree.patch" + file://out-of-tree.patch \ + file://0001-sha1-Include-unistd.h-for-off_t.patch \ + " SRC_URI[sha256sum] = "0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2" inherit autotools --2.32.0