Problems compiling ISDN driver

Christoph Hellwig hch@infradead.org
Mon Aug 12 04:17:00 GMT 2002


On Mon, Aug 12, 2002 at 11:58:35AM +0100, Andrew Haley wrote:
> It's because of this function:
> 
> unsigned long os_msec (void) {
> 
> 	return (((unsigned long long) jiffies) * 1000) / HZ;
> } /* os_msec */
> 
> It doesn't look very hard to rewrite this not to use division if HZ is
> 100.  Alternatively, try this:

Or rewrite the driver to use jiffies properly.  wait it's propritary software..

This gets a little offtopic for the gcc ml, though.

Fact is: the Linux kernel is _not_ linked against libgcc, and there are valid
reasons not to do so.  If a propirtary module assumes being able do do any
kind of dvisions / modulo operations on 64bit integers it's your problem, not
the kernels or gccs, especially if there is a perfectly working free alternative.

	Christoph

P.S. the linux kernel has a nice do_div macro for 64bit through 32bit division..



More information about the Gcc mailing list