Subject: Re: [PATCH] qemu tap support broken on current 3.99.17
To: None <tech-pkg@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-pkg
Date: 04/17/2006 10:55:27
On Mon, 17 Apr 2006, Hubert Feyrer wrote:
> You'll want to add some #ifdef to check that your code for a cloning 
> tap(4) is really needed. As far as I understand.
> 
> See pkgsrc/emulator/pcemu's patch-ac file, which checks __NetBSD_Version__ 
> against some value that indicates when (for your case) cloning tap(4) 
> support was added. Finding the right value is a bit of black magic, 
> looking at the CVS revision (change) history of src/sys/sys/param.h may 
> help finding it.

I prefer checking for the feature itelf, rather than checking the OS
version.  For example, in pkgsrc/net/openvpn, the (patched) configure
script checks for the existence of <net/if_tap.h>, and the (patched)
code that wants to use the feature checks #if defined(TAPGIFNAME).

--apb (Alan Barrett)