From owner-svn-ports-head@FreeBSD.ORG Fri May 1 22:40:01 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F883A53; Fri, 1 May 2015 22:40:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 442AD165C; Fri, 1 May 2015 22:40:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41Me1wI025556; Fri, 1 May 2015 22:40:01 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41Me1E6025555; Fri, 1 May 2015 22:40:01 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201505012240.t41Me1E6025555@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Fri, 1 May 2015 22:40:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385155 - head/sysutils/xmbmon/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 22:40:01 -0000 Author: grembo Date: Fri May 1 22:40:00 2015 New Revision: 385155 URL: https://svnweb.freebsd.org/changeset/ports/385155 Log: Fix build on HEAD after SMBus change (r281985/r282256). Approved by: mentors (implicit) Modified: head/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c Modified: head/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c ============================================================================== --- head/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c Fri May 1 22:22:55 2015 (r385154) +++ head/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c Fri May 1 22:40:00 2015 (r385155) @@ -1,7 +1,7 @@ $FreeBSD$ --- getMB-smb_ioctl.c.orig Sat Jul 5 18:15:24 2003 -+++ getMB-smb_ioctl.c Fri Dec 16 17:56:54 2005 ++++ getMB-smb_ioctl.c Sat May 2 00:35:54 2015 @@ -5,6 +5,7 @@ #ifdef HAVE_SMBUS /* assume SMBus ioctl support, only for FreeBSD */ @@ -22,3 +22,67 @@ $FreeBSD$ #include "methods.h" +@@ -42,10 +47,12 @@ + + static int OpenIO() + { +- char byte; + struct smbcmd cmd; + cmd.slave = smb_slave; ++#if (__FreeBSD_version < 1100071) ++ char byte; + cmd.data.byte_ptr = &byte; ++#endif + + if ((iosmb = open(smb_devfile, 000)) < 0) { + strcpy(buf, "ioctl("); +@@ -125,7 +132,12 @@ + char ret; + cmd.slave = slave; + cmd.cmd = addr; ++#if (__FreeBSD_version >= 1100071) ++ cmd.rbuf = &ret; ++ cmd.rcount = 1; ++#else + cmd.data.byte_ptr = &ret; ++#endif + if (ioctl(iosmb, SMB_READB, &cmd) == -1) { + /* strcpy(buf, "ioctl("); + strcat(buf, smb_devfile + 5); +@@ -142,7 +154,11 @@ + struct smbcmd cmd; + cmd.slave = slave; + cmd.cmd = addr; ++#if (__FreeBSD_version >= 1100071) ++ cmd.wdata.byte = value; ++#else + cmd.data.byte = value; ++#endif + if (ioctl(iosmb, SMB_WRITEB, &cmd) == -1) { + strcpy(buf, "ioctl("); + strcat(buf, smb_devfile + 5); +@@ -158,7 +174,12 @@ + short ret; + cmd.slave = smb_slave; + cmd.cmd = addr; ++#if (__FreeBSD_version >= 1100071) ++ cmd.rbuf = (char*) &ret; ++ cmd.rcount = 2; ++#else + cmd.data.word_ptr = &ret; ++#endif + if (ioctl(iosmb, SMB_READW, &cmd) == -1) { + /* strcpy(buf, "ioctl("); + strcat(buf, smb_devfile + 5); +@@ -175,7 +196,11 @@ + struct smbcmd cmd; + cmd.slave = slave; + cmd.cmd = addr; ++#if (__FreeBSD_version >= 1100071) ++ cmd.wdata.word = value; ++#else + cmd.data.word = value; ++#endif + if (ioctl(iosmb, SMB_WRITEW, &cmd) == -1) { + strcpy(buf, "ioctl("); + strcat(buf, smb_devfile + 5);