Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/pci



On Sat, Feb 09, 2008 at 12:25:43PM +0000, Jaime Fournier wrote:

> Log Message:
> Intel PRO/Wireless LAN 4965AGN Mini-PCI Adapter Driver ported from OpenBSD
> by deroote@.  OK nick@ moof@

Thanks!

But there's a problem compiling it under NetBSD/amd64 due to __uint64_t
being defined on amd64 as ``unsigned long int'' only and not ``unsigned long
long int''.

[snip]
#   compile  CLEMENTINE/if_iwn.o
/usr/src/tooldir.amd64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffr
eestanding -fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer -Werror -Wal
l -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstric
t-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wn
o-pointer-sign -Wno-attributes -fno-strict-aliasing -Werror -Wall -Wno-main -Wno
-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Ws
witch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -Wno-pointer-sign -
Wno-attributes -Werror -Damd64 -Dx86_64 -I. -I/usr/src/sys/contrib/dev/ath/netbs
d -I/usr/src/sys/../common/include -I/usr/src/sys/arch -I/usr/src/sys -nostdinc 
-DLKM -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../
common/lib/libc/quad -I/usr/src/sys/lib/libkern/../../../common/lib/libc/string 
-I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string -I/usr/sr
c/sys/dist/ipf -c /usr/src/sys/dev/pci/if_iwn.c
cc1: warnings being treated as errors
/usr/src/sys/dev/pci/if_iwn.c: In function 'iwn_enable_tsf':
/usr/src/sys/dev/pci/if_iwn.c:2581: warning: format '%llu' expects type 'long lo
ng unsigned int', but argument 3 has type '__uint64_t'
[/snip]

A possible fix might be casting the function. See attached file.

Btw, if_wpi.c has a similar case being solved differently -- that way it
doesn't work for this case, however.

--
hernani
Index: if_iwn.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.1
diff -u -r1.1 if_iwn.c
--- if_iwn.c    9 Feb 2008 12:25:43 -0000       1.1
+++ if_iwn.c    9 Feb 2008 17:55:44 -0000
@@ -2579,7 +2579,8 @@
        tsf.binitval = htole32((uint32_t)(val - mod));
 
        DPRINTF(("TSF bintval=%u tstamp=%llu, init=%u\n",
-           ni->ni_intval, le64toh(tsf.tstamp), (uint32_t)(val - mod)));
+           ni->ni_intval, (unsigned long long) le64toh(tsf.tstamp), 
+           (uint32_t)(val - mod)));
 
        if (iwn_cmd(sc, IWN_CMD_TSF, &tsf, sizeof tsf, 1) != 0)
                aprint_error_dev(sc->sc_dev, "could not enable TSF\n");

Attachment: pgpQ08lR_CqnS.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index