Date: Fri, 1 May 2015 22:40:01 +0000 (UTC) From: Michael Gmelin <grembo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385155 - head/sysutils/xmbmon/files Message-ID: <201505012240.t41Me1E6025555@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505012240.t41Me1E6025555>