summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-03-10 08:29:53 +0000
committerluigi <luigi@FreeBSD.org>2002-03-10 08:29:53 +0000
commit4834f513d8c985323a5d5ec3e0ea69301f3e1ad4 (patch)
tree63d2dcb0fdc9daf541ef3a1e7956055e3f553fb9 /sys
parent8d1e8325c0b0bae69265f46b137c7faf33b85432 (diff)
downloadFreeBSD-src-4834f513d8c985323a5d5ec3e0ea69301f3e1ad4.zip
FreeBSD-src-4834f513d8c985323a5d5ec3e0ea69301f3e1ad4.tar.gz
Fix one genuine bug and a potential one:
-#if defined(__FreeBSD__) && __FreeBSD_version__ >= 500023 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500023 is a genuine bug -- __FreeBSD_version__ does not exist. The other one: -#if (__FreeBSD__ < 5) +#if (__FreeBSD_version < 500000) pops out when you cross-compile the code: __FreeBSD__ is a compiler predefine, __FreeBSD_version is defined in <sys/param.h> . Given that in this case (and all others in sys/dev/usb and sys/i4b) the goal is to adapt to a different kernel interface, and not to a compiler feature, I believe the correct form is the second one (in the best case the two are synonyms so the change does not break anything anyways).
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ufm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c
index 32a85dd..3d92b12 100644
--- a/sys/dev/usb/ufm.c
+++ b/sys/dev/usb/ufm.c
@@ -72,7 +72,7 @@ int ufmdebug = 100;
#define DPRINTFN(n,x)
#endif
-#if defined(__FreeBSD__) && __FreeBSD_version__ >= 500023
+#if defined(__FreeBSD__) && __FreeBSD_version >= 500023
typedef struct thread usb_proc_t;
#else
typedef struct proc usb_proc_t;
@@ -97,7 +97,7 @@ Static struct cdevsw ufm_cdevsw = {
ufmioctl, nopoll, nommap, nostrategy,
"ufm", UFM_CDEV_MAJOR, nodump, nopsize,
0,
-#if (__FreeBSD__ < 5)
+#if (__FreeBSD_version < 500000)
-1
#endif
};
OpenPOWER on IntegriCloud