bug-gnulib
[Top][All Lists]
Advanced

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

Re: On OpenBSD and if_freenameindex(3).


From: Simon Josefsson
Subject: Re: On OpenBSD and if_freenameindex(3).
Date: Tue, 21 Sep 2010 22:41:43 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 09/21/2010 06:22 AM, Simon Josefsson wrote:
>> As an initial response to this problem, I'm installing a self check of
>> the net/if.h interface.  See below.  Mats, if you could quote the
>> compiler errors you get when building the self-check below on OpenBSD,
>> that would be useful.  The next step is to see how gnulib can provide a
>> replacement that works on various systems.  Perhaps OpenBSD isn't the
>> only system not working here.
>
> +#include <net/if.h>
> +#include <stddef.h> /* NULL */
> +#include <stdio.h> /* printf */
> +
> +int
> +main (int argc, char *argv[])
> +{
> +  struct if_nameindex ifn, *ifnp, *p;
> +  void (*if_fni) (struct if_nameindex *) = if_freenameindex;
>
> Rather than doing this via a struct in main(), after you have already
> dragged in other headers, it would be nicer to use "signature.h" and
> do signature validation at the top of the file.  Would you like me to
> prepare a patch along those lines?

Yes please do and push it.  I haven't used the signature.h mechanism (or
I have forgotten how to), so I'll learn if you post the patch.

/Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]