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

Bug#535243: kfreebsd-kernel-headers: Wrong type in <sys/pciio.h>?

Package: kfreebsd-kernel-headers
Version: 0.34
Severity: important
Tags: patch


while working on hal on kfreebsd-i386, I've stumbled upon the following:
./hald/freebsd/hf-pci.c includes <sys/pciio.h>, but the latter uses
uint64_t for the pci_bar_io structure, instead of u_intNN_t for other
structures, and the compiler fails on that token.

Maybe a -D (I tried __USE_BSD) or another include is missing? Or one
could just use the attached patch (I copied the path from the
000_bruno_haible.diff patch, I didn't install the whole sources)?

--- src/sys/sys/pciio.h
+++ src/sys/sys/pciio.h
@@ -113,8 +113,8 @@
 	struct pcisel	pbi_sel;	/* device to operate on */
 	int		pbi_reg;	/* starting address of BAR */
 	int		pbi_enabled;	/* decoding enabled */
-	uint64_t	pbi_base;	/* current value of BAR */
-	uint64_t	pbi_length;	/* length of BAR */
+	u_int64_t	pbi_base;	/* current value of BAR */
+	u_int64_t	pbi_length;	/* length of BAR */
 #define	PCIOCGETCONF	_IOWR('p', 5, struct pci_conf_io)

Reply to: