From b801b390765b7d2064e176d4dcd66baa46aebe80 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 18 Apr 1999 19:07:16 +0000 Subject: [PATCH] Alpha compilation fixes by Matthew Jacob. --- lib/proc.c | 9 +++++++-- lspci.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/proc.c b/lib/proc.c index f5ae883..87b0631 100644 --- a/lib/proc.c +++ b/lib/proc.c @@ -1,5 +1,5 @@ /* - * $Id: proc.c,v 1.1 1999/01/22 21:05:39 mj Exp $ + * $Id: proc.c,v 1.2 1999/04/18 19:08:12 mj Exp $ * * The PCI Library -- Configuration Access via /proc/bus/pci * @@ -107,7 +107,12 @@ proc_scan(struct pci_access *a) struct pci_dev *d = pci_alloc_dev(a); unsigned int dfn, vend; - sscanf(buf, "%x %x %x %lx %lx %lx %lx %lx %lx %lx", + sscanf(buf, +#ifdef HAVE_64BIT_ADDRESS + "%x %x %x %llx %llx %llx %llx %llx %llx %llx", +#else + "%x %x %x %lx %lx %lx %lx %lx %lx %lx", +#endif &dfn, &vend, &d->irq, diff --git a/lspci.c b/lspci.c index 9c89da2..ab987cd 100644 --- a/lspci.c +++ b/lspci.c @@ -1,5 +1,5 @@ /* - * $Id: lspci.c,v 1.23 1999/02/28 20:23:07 mj Exp $ + * $Id: lspci.c,v 1.24 1999/04/18 19:07:16 mj Exp $ * * Linux PCI Utilities -- List All PCI Devices * @@ -292,7 +292,7 @@ show_bases(struct device *d, int cnt) if (buscentric_view) { if (a || z) - printf("%08x%08lx", z, a); + printf("%08x" ADDR_FORMAT, z, a); else printf(""); done = 1; -- 2.39.2