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: Eric Blake
Subject: Re: On OpenBSD and if_freenameindex(3).
Date: Tue, 21 Sep 2010 08:49:59 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3

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?

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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