svn commit: r211252 - head/usr.sbin/acpi/acpidump

Takanori Watanabe takawata at FreeBSD.org
Fri Aug 13 00:45:30 UTC 2010


Author: takawata
Date: Fri Aug 13 00:45:30 2010
New Revision: 211252
URL: http://svn.freebsd.org/changeset/base/211252

Log:
  Fix build on amd64 and ia64.

Modified:
  head/usr.sbin/acpi/acpidump/acpi.c

Modified: head/usr.sbin/acpi/acpidump/acpi.c
==============================================================================
--- head/usr.sbin/acpi/acpidump/acpi.c	Fri Aug 13 00:21:32 2010	(r211251)
+++ head/usr.sbin/acpi/acpidump/acpi.c	Fri Aug 13 00:45:30 2010	(r211252)
@@ -40,7 +40,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <inttypes.h>
 
 #include "acpidump.h"
 
@@ -623,7 +622,7 @@ acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp)
 {
 	struct TCPAbody *tcpa;
 	struct TCPAevent *event;
-	u_int64_t len, paddr;
+	uint64_t len, paddr;
 	unsigned char *vaddr = NULL;
 	unsigned char *vend = NULL;
 
@@ -647,7 +646,7 @@ acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp)
 		printf(END_COMMENT);
 		return;
 	}
-	printf("\tClass %d Base Address 0x%jx Length %" PRIu64 "\n\n",
+	printf("\tClass %u Base Address 0x%jx Length %ju\n\n",
 	    tcpa->platform_class, paddr, len);
 
 	if (len == 0) {
@@ -662,7 +661,7 @@ acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp)
 	while (vaddr != NULL) {
 		if (vaddr + sizeof(struct TCPAevent) >= vend)
 			break;
-		event = (struct TCPAevent *)vaddr;
+		event = (struct TCPAevent *)(void *)vaddr;
 		if (vaddr + event->event_size >= vend)
 			break;
 		if (event->event_type == 0 && event->event_size == 0)


More information about the svn-src-all mailing list