From 3c7ab4ec7648a7be8fe1d40e3e9d081aa3e806ab Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Tue, 11 Jun 2019 17:51:18 +0300 Subject: [PATCH] fm/modules/fabric-xlate: fix 64-bit compilation --- usr/src/cmd/fm/modules/common/fabric-xlate/Makefile | 6 +++--- usr/src/cmd/fm/modules/common/fabric-xlate/fx_subr.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile b/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile index 0abd75b025..559b2cf92c 100644 --- a/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile +++ b/usr/src/cmd/fm/modules/common/fabric-xlate/Makefile @@ -33,10 +33,10 @@ include ../../Makefile.plugin CPPFLAGS += -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I$(KMFDIR)/include -I. CPPFLAGS += -I$(SRC)/uts/sun4v/io/px INCDIRS = $(SRCTOP)/include -CFLAGS += -I$(INCDIRS) +CFLAGS64 += -I$(INCDIRS) -LDFLAGS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm -LDLIBS += -luutil -lxml2 -L$(ROOTLIB)/fm -ltopo +LDLIBS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm +LDLIBS += -luutil -lxml2 -L$(ROOT)/usr/lib/fm -ltopo CERRWARN += -Wno-parentheses CERRWARN += -Wno-switch diff --git a/usr/src/cmd/fm/modules/common/fabric-xlate/fx_subr.c b/usr/src/cmd/fm/modules/common/fabric-xlate/fx_subr.c index 8593144b28..b7fb291f30 100644 --- a/usr/src/cmd/fm/modules/common/fabric-xlate/fx_subr.c +++ b/usr/src/cmd/fm/modules/common/fabric-xlate/fx_subr.c @@ -189,9 +189,9 @@ fab_send_erpt(fmd_hdl_t *hdl, fab_data_t *data, fab_err_tbl_t *tbl) erpt_tbl = tbl->erpt_tbl; if (tbl->reg_size == 16) { reg = (uint32_t)*((uint16_t *) - ((uint32_t)data + tbl->reg_offset)); + ((uintptr_t)data + tbl->reg_offset)); } else { - reg = *((uint32_t *)((uint32_t)data + tbl->reg_offset)); + reg = *((uint32_t *)((uintptr_t)data + tbl->reg_offset)); } for (entry = erpt_tbl; entry->err_class; entry++) { -- 2.11.4.GIT