blob: 8964d6b72fe60b2c548bf80ca21147e3a9963190 [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001From 9b39a985bcd6cd34f0820f3680f145d46c0e56bd Mon Sep 17 00:00:00 2001
2From: Titouan Christophe <titouan.christophe@railnova.eu>
3Date: Sun, 8 Dec 2019 01:55:59 +0100
4Subject: [PATCH] Allow avro C to be built on musl based systems.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The type `ssize_t` is defined in sys/types.h, and nowhere else
10in the musl standard C library, so it should be included for the
11compilation to succeed.
12
13This fixes several errors like:
14
15 In file included from src/generic.c:29:0:
16 src/generic.c: In function avro_generic_value_new’:
17 src/avro_generic_internal.h:63:39:
18 error: ssize_t undeclared (first use in this function);
19 did you mean size_t’?
20
21Upstream-Status: Backport
22Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
23---
24 lang/c/src/avro_generic_internal.h | 2 ++
25 1 file changed, 2 insertions(+)
26
27diff --git a/lang/c/src/avro_generic_internal.h b/lang/c/src/avro_generic_internal.h
28index 709403c03..9843ed652 100644
29--- a/lang/c/src/avro_generic_internal.h
30+++ b/lang/c/src/avro_generic_internal.h
31@@ -24,6 +24,8 @@ extern "C" {
32 #define CLOSE_EXTERN
33 #endif
34
35+#include <sys/types.h>
36+
37 #include "avro/generic.h"
38 #include "avro/schema.h"
39 #include "avro/value.h"
40--
412.24.1
42