You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by rs...@apache.org on 2019/12/18 14:25:33 UTC

[avro] branch branch-1.9 updated: Allow avro C to be built on musl based systems.

This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.9 by this push:
     new 0415343  Allow avro C to be built on musl based systems.
0415343 is described below

commit 0415343b1e1788d214bda54b04eaf61ac006e51b
Author: Titouan Christophe <ti...@railnova.eu>
AuthorDate: Sun Dec 8 01:55:59 2019 +0100

    Allow avro C to be built on musl based systems.
    
    The type `ssize_t` is defined in sys/types.h, and nowhere else
    in the musl standard C library, so it should be included for the
    compilation to succeed.
    
    This fixes several errors like:
    
        In file included from src/generic.c:29:0:
        src/generic.c: In function ‘avro_generic_value_new’:
        src/avro_generic_internal.h:63:39:
            error: ‘ssize_t’ undeclared (first use in this function);
                   did you mean ‘size_t’?
    
    Signed-off-by: Titouan Christophe <ti...@railnova.eu>
---
 lang/c/src/avro_generic_internal.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lang/c/src/avro_generic_internal.h b/lang/c/src/avro_generic_internal.h
index 709403c..9843ed6 100644
--- a/lang/c/src/avro_generic_internal.h
+++ b/lang/c/src/avro_generic_internal.h
@@ -24,6 +24,8 @@ extern "C" {
 #define CLOSE_EXTERN
 #endif
 
+#include <sys/types.h>
+
 #include "avro/generic.h"
 #include "avro/schema.h"
 #include "avro/value.h"