[netcf-devel] allow C++ linking

Laine Stump laine at laine.org
Thu Jun 23 02:51:21 UTC 2011


On 06/20/2011 06:29 AM, Aleix Conchillo wrote:
> Hi,
>
> the patch at the end allows buidling c++ applications against netcf.
>
> Otherwise, this is needed in the C++ code
>
> extern "C" {
> #include<netcf.h>
> }

ACK. Thanks for pointing this out.

Your patch didn't apply with git am, but it was simple enough to draft 
up an email that did apply but still had your name. I'm pushing it now, 
and it will be in the next release.

> Thanks for this library!
>
> Aleix
>
> ---------------
>
> --- a/src/netcf.h
> +++ b/src/netcf.h
> @@ -81,6 +81,9 @@ typedef enum {
>        NETCF_IFACE_ACTIVE = 2,       /* match up interfaces */
>    } netcf_if_flag_t;
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
>
>    /*
>     * Initialize netcf. This function must be called before any other netcf
> @@ -223,6 +226,11 @@ void ncf_if_free(struct netcf_if *);
>     * next call to another function in this API.
>     */
>    int ncf_error(struct netcf *, const char **errmsg, const char **details);
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
>    #endif
> _______________________________________________
> netcf-devel mailing list
> netcf-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/netcf-devel
>



More information about the netcf-devel mailing list