aboutsummaryrefslogtreecommitdiff
path: root/sysutils/consolehm/files
diff options
context:
space:
mode:
authorMichael Gmelin <grembo@FreeBSD.org>2015-05-01 20:41:13 +0000
committerMichael Gmelin <grembo@FreeBSD.org>2015-05-01 20:41:13 +0000
commit0d1f07faa8d3c589abe463b786dbc04a537358f1 (patch)
treee49c834bb07f33dd77c532588b45c697e6760324 /sysutils/consolehm/files
parentcfff2b17d3c2ee7d75afc4d2c4b17bdf485bbfa2 (diff)
downloadports-0d1f07faa8d3c589abe463b786dbc04a537358f1.tar.gz
ports-0d1f07faa8d3c589abe463b786dbc04a537358f1.zip
Fix build on HEAD after SMBus change (r281985/r282256).
Approved by: mentors (implicit)
Notes
Notes: svn path=/head/; revision=385147
Diffstat (limited to 'sysutils/consolehm/files')
-rw-r--r--sysutils/consolehm/files/patch-chm.c53
1 files changed, 51 insertions, 2 deletions
diff --git a/sysutils/consolehm/files/patch-chm.c b/sysutils/consolehm/files/patch-chm.c
index d397e5beed16..acf86381eaa9 100644
--- a/sysutils/consolehm/files/patch-chm.c
+++ b/sysutils/consolehm/files/patch-chm.c
@@ -1,5 +1,13 @@
---- chm.c.orig Sat Jun 12 22:53:48 2004
-+++ chm.c Sat Jun 12 22:54:11 2004
+--- chm.c.orig 2000-12-23 07:51:45.000000000 +0100
++++ chm.c 2015-05-01 22:23:03.577465000 +0200
+@@ -25,6 +25,7 @@
+ *
+ */
+
++#include <osreldate.h>
+ #include "chm.h"
+
+ static int io_file;
@@ -165,6 +165,7 @@
printf("Delay: %d microseconds. \n\n",delay);
break;
@@ -8,3 +16,44 @@
}
file_handle = OpenIO();
+@@ -279,7 +280,12 @@
+ u_char smb_return;
+ struct smbcmd cmd;
+ cmd.slave=0x5a;
++#if (__FreeBSD_version >= 1100071)
++ cmd.rbuf = &smb_return;
++ cmd.rcount = 1;
++#else
+ cmd.data.byte_ptr=&smb_return;
++#endif
+ if((open_smb=open("/dev/smb0",000))<0){
+ fprintf(stderr, "Failed to open /dev/smb0.\n");
+ exit (-1);
+@@ -315,7 +321,12 @@
+ u_char smb_return;
+ struct smbcmd cmd;
+ cmd.slave=0x5a;
++#if (__FreeBSD_version >= 1100071)
++ cmd.rbuf = &smb_return;
++ cmd.rcount = 1;
++#else
+ cmd.data.byte_ptr=&smb_return;
++#endif
+ cmd.cmd=addr;
+ if(ioctl(open_smb,SMB_READB,&cmd)==-1){
+ perror("IOCTL");
+@@ -342,9 +353,13 @@
+ u_char smb_return;
+ struct smbcmd cmd;
+ cmd.slave=0x5a;
++#if (__FreeBSD_version >= 1100071)
++ cmd.wdata.byte = value;
++#else
+ cmd.data.byte_ptr=&smb_return;
+- cmd.cmd=addr;
+ cmd.data.byte=value;
++#endif
++ cmd.cmd=addr;
+ if(ioctl(open_smb,SMB_WRITEB,&cmd)==-1){
+ perror("IOCTL");
+ return -1;