summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-support/zchunk/zchunk/0001-zck.h-fix-build-on-musl.patch
blob: 64e0e8ed61721e3438a4623a13a16b1da4f1105a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 78247d478cec254bad27f4ed97b532f4f54bf1b0 Mon Sep 17 00:00:00 2001
From: Pierre-Jean Texier <pjtexier@koncepto.io>
Date: Thu, 23 Jan 2020 19:14:40 +0100
Subject: [PATCH 1/2] zck.h: fix build on musl

The ssize_t type requires the <sys/types.h> header. This fixes build with musl
libc:

include/zck.h:68:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
   68 | ssize_t zck_read(zckCtx *zck, char *dst, size_t dst_size)
      | ^~~~~~~
      | size_t
include/zck.h:81:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
   81 | ssize_t zck_write(zckCtx *zck, const char *src, const size_t src_size)
      | ^~~~~~~
      | size_t
      
Upstream-Status: Submitted [https://github.com/zchunk/zchunk/pull/23]

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
 include/zck.h.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/zck.h.in b/include/zck.h.in
index 91d2557..b847576 100644
--- a/include/zck.h.in
+++ b/include/zck.h.in
@@ -5,6 +5,7 @@
 
 #include <stdlib.h>
 #include <stdbool.h>
+#include <sys/types.h>
 
 typedef enum zck_hash {
     ZCK_HASH_SHA1,
-- 
2.7.4