Date: Fri, 1 Sep 2000 13:15:18 +0200 (CEST) From: Paul Herman <pherman@frenchfries.net> To: freebsd-isdn@FreeBSD.ORG Subject: No "RANDOMDEV" breaks i4b Message-ID: <Pine.BSF.4.21.0009011307010.312-100000@bagabeedaboo.security.at12.de>
next in thread | raw e-mail | index | archive | help
Hello isdn-ers, If you compile a kernel without the option "RANDOMDEV" i4b fails to compile. I'm using FreeBSD -CURRENT from Aug 31. Here is a patch which allows i4b to compile even if RANDOMDEV is not configured. It works, but I personally don't like the hardcoded 0xffff stuff; maybe the patch could use some cute "sizeof()" tricks... BTW, this doesn't use the kld randomdev.ko. Anybody know an easy way to incorporate that? -Paul. -------------------------------------------------------- --- layer2/i4b_tei.c.orig Fri Sep 1 12:39:28 2000 +++ layer2/i4b_tei.c Fri Sep 1 12:41:07 2000 @@ -292,5 +292,9 @@ u_short val; +#ifdef RANDOMDEV read_random((char *)&val, sizeof(val)); +#else + val = random() & 0xffff; +#endif #else --- layer4/i4b_l4mgmt.c.orig Fri Sep 1 12:42:02 2000 +++ layer4/i4b_l4mgmt.c Fri Sep 1 12:42:42 2000 @@ -270,5 +270,9 @@ #if defined(__FreeBSD__) +#ifdef RANDOMDEV read_random((char *)&val, sizeof(val)); +#else + val = random() & 0xff; +#endif #else val |= unit+i; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009011307010.312-100000>