Mats Erik Andersson <mats.anders...@gisladisker.se> writes: > tisdag den 21 september 2010 klockan 14:22 skrev Simon Josefsson detta: >> 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. >> >> /Simon > > Quickest reply without need to test compile: > > #include <sys/types.h> > #include <sys/socket.h> > #include <net/if.h> > > is the mandatory order for OpenBSD! Lest <config.h> knows that, > the test must augmented. Will return later for more info.
That's the first thing a gnulib net/if.h replacement header should provide then, since I believe the net/if.h header needs to be self-contained according to POSIX. It would be interesting to see if the self tests works even if you make the above modification, though. Also try running it with a command line parameter and check that it prints all the host interfaces on your machine. Thanks, /Simon