From: Martin Mares Date: Wed, 10 May 2006 09:28:37 +0000 (+0200) Subject: Added support for GNU/kFreeBSD. X-Git-Tag: v3.0.0~63 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d1058e9dee26b0ae0f8a595e07bfdee20a5fecef;p=pciutils.git Added support for GNU/kFreeBSD. --- diff --git a/ChangeLog b/ChangeLog index 98ee562..3ac84c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-10 Martin Mares + + * lib/configure, lib/fbsd-device.c: Added support for GNU/kFreeBSD. + Thanks to Petr Salinger for the patch. + 2006-05-05 Martin Mares * Released as 2.2.3. diff --git a/lib/configure b/lib/configure index 2a91c39..6a440d2 100755 --- a/lib/configure +++ b/lib/configure @@ -22,6 +22,10 @@ then else cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/'` fi +if [ "$sys" = "GNU/kFreeBSD" ] +then + sys=freebsd +fi host=${3:-$cpu-$sys} host=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)$/\1--\2/' | tr 'A-Z' 'a-z'` cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c index 833af56..ba3337c 100644 --- a/lib/fbsd-device.c +++ b/lib/fbsd-device.c @@ -11,6 +11,13 @@ #include #include #include +#include + +#ifdef __FreeBSD_kernel_version +# ifndef __FreeBSD_version +# define __FreeBSD_version __FreeBSD_kernel_version +# endif +#endif #if __FreeBSD_version < 500000 # include