diff options
| author | Michael Forney <mforney@mforney.org> | 2017-10-01 14:14:26 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-10-03 23:05:27 -0700 |
| commit | 26550ea9d5b168d720d5feeab02c25f070c388be (patch) | |
| tree | 7be0948c3bd31351420c674487c7ec6ff696d5d0 /pkg/libsignal-protocol-c/patch | |
| parent | da6337aa5a73f535ef9ff2588ffc019f96613590 (diff) | |
Add libsignal-protocol-c git
Diffstat (limited to 'pkg/libsignal-protocol-c/patch')
| -rw-r--r-- | pkg/libsignal-protocol-c/patch/0001-Avoid-including-sys-cdefs.h-header.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkg/libsignal-protocol-c/patch/0001-Avoid-including-sys-cdefs.h-header.patch b/pkg/libsignal-protocol-c/patch/0001-Avoid-including-sys-cdefs.h-header.patch new file mode 100644 index 00000000..104f4d42 --- /dev/null +++ b/pkg/libsignal-protocol-c/patch/0001-Avoid-including-sys-cdefs.h-header.patch @@ -0,0 +1,60 @@ +From b77b2265f0a45ebc9ca4734f90f9e12ad2139ba2 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 28 Sep 2017 10:40:17 -0700 +Subject: [PATCH] Avoid including sys/cdefs.h header + +sys/cdefs.h is non-standard, and other headers in the project already just use +`#ifdef __cplusplus` directly. The existing ifdefs and defines are confusing and +broken in some cases (for instance, musl libc does not provide sys/cdefs.h, so +the build fails). +--- + src/vpool.h | 20 ++++++-------------- + 1 file changed, 6 insertions(+), 14 deletions(-) + +diff --git a/src/vpool.h b/src/vpool.h +index 04707cb..71b9710 100644 +--- a/src/vpool.h ++++ b/src/vpool.h +@@ -21,18 +21,6 @@ + #define _VPOOL_H_ + + #include <sys/types.h> +-#if !defined(_WINDOWS) && !defined(__sun__) +-#include <sys/cdefs.h> +-#else +-#ifdef __cplusplus +-#define __BEGIN_DECLS extern "C" { +-#define __END_DECLS } +-#else +-#define __BEGIN_DECLS +-#define __END_DECLS +-#endif /* __cplusplus */ +-#endif /* _WINDOWS */ +- + #include <limits.h> + + struct vpool { +@@ -49,7 +37,9 @@ struct vpool { + enum vpool_trunc {VPOOL_EXCLUDE, VPOOL_INCLUDE}; + #define VPOOL_TAIL UINT_MAX + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + void vpool_init(struct vpool *pool, size_t blksize, size_t limit); + void vpool_final(struct vpool *pool); +@@ -71,6 +61,8 @@ int vpool_truncate(struct vpool *pool, + + void vpool_export(struct vpool *pool, void **buf, size_t *size); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* !_VPOOL_H_ */ +-- +2.14.2 + |
