Eric Blake <ebl...@redhat.com> 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