Re: [PATCH] Fix musl build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 10, 2016 at 9:54 AM,  <yegorslists@xxxxxxxxxxxxxx> wrote:
> From: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
>
> Replace __BEGIN_DECLS/__END_DECLS macros with following blocks:
>
> extern "C" {
>
> }
>
> __BEGIN_DECLS/__END_DECLS are not part of all C libraries.
>
> Signed-off-by: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
> ---
>  src/include/netinet/sctp.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/include/netinet/sctp.h b/src/include/netinet/sctp.h
> index 51f5bfb..47571cd 100644
> --- a/src/include/netinet/sctp.h
> +++ b/src/include/netinet/sctp.h
> @@ -37,7 +37,9 @@
>  #include <linux/types.h>
>  #include <sys/socket.h>
>
> -__BEGIN_DECLS
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
>
>  typedef __s32 sctp_assoc_t;
>
> @@ -862,6 +864,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
>  /* Return the address length for an address family. */
>  int sctp_getaddrlen(sa_family_t family);
>
> -__END_DECLS
> +#ifdef __cplusplus
> +}
> +#endif
>
>  #endif /* __linux_sctp_h__ */
> --
> 2.7.0
>

For the reference:
http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux