mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
sysutils/consolehm: fix build on non-x86
outb requires including machine/pio.h and sys/types.h (for uint8_t). Approved by: linimon (mentor) Differential Revision: https://reviews.freebsd.org/D21633
This commit is contained in:
parent
2460b9c47b
commit
6f267705e9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512513
2 changed files with 11 additions and 10 deletions
|
@ -10,9 +10,6 @@ MASTER_SITES= LOCAL/fenner
|
||||||
MAINTAINER= ports@FreeBSD.org
|
MAINTAINER= ports@FreeBSD.org
|
||||||
COMMENT= Console based hardware monitor for FreeBSD
|
COMMENT= Console based hardware monitor for FreeBSD
|
||||||
|
|
||||||
ONLY_FOR_ARCHS= i386 amd64
|
|
||||||
ONLY_FOR_ARCHS_REASON= uses x86-only assembly from machine/cpufunc.h
|
|
||||||
|
|
||||||
USES= uidfix
|
USES= uidfix
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
WRKSRC= ${WRKDIR}/consolehm/consolehm
|
WRKSRC= ${WRKDIR}/consolehm/consolehm
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
--- chm.c.orig 2000-12-23 07:51:45.000000000 +0100
|
--- chm.c.orig 2000-12-23 06:51:45 UTC
|
||||||
+++ chm.c 2015-05-01 22:23:03.577465000 +0200
|
+++ chm.c
|
||||||
@@ -25,6 +25,7 @@
|
@@ -25,6 +25,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
+#include <osreldate.h>
|
+#include <osreldate.h>
|
||||||
|
+#if (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) && defined(__FreeBSD__)
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#include <machine/pio.h>
|
||||||
|
+#endif
|
||||||
#include "chm.h"
|
#include "chm.h"
|
||||||
|
|
||||||
static int io_file;
|
static int io_file;
|
||||||
@@ -165,6 +165,7 @@
|
@@ -165,6 +170,7 @@ int main (int argc, char **argv)
|
||||||
printf("Delay: %d microseconds. \n\n",delay);
|
printf("Delay: %d microseconds. \n\n",delay);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -16,7 +20,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
file_handle = OpenIO();
|
file_handle = OpenIO();
|
||||||
@@ -279,7 +280,12 @@
|
@@ -279,7 +285,12 @@ int OpenIO()
|
||||||
u_char smb_return;
|
u_char smb_return;
|
||||||
struct smbcmd cmd;
|
struct smbcmd cmd;
|
||||||
cmd.slave=0x5a;
|
cmd.slave=0x5a;
|
||||||
|
@ -29,7 +33,7 @@
|
||||||
if((open_smb=open("/dev/smb0",000))<0){
|
if((open_smb=open("/dev/smb0",000))<0){
|
||||||
fprintf(stderr, "Failed to open /dev/smb0.\n");
|
fprintf(stderr, "Failed to open /dev/smb0.\n");
|
||||||
exit (-1);
|
exit (-1);
|
||||||
@@ -315,7 +321,12 @@
|
@@ -315,7 +326,12 @@ int ReadByte(u_char *return_value, int addr)
|
||||||
u_char smb_return;
|
u_char smb_return;
|
||||||
struct smbcmd cmd;
|
struct smbcmd cmd;
|
||||||
cmd.slave=0x5a;
|
cmd.slave=0x5a;
|
||||||
|
@ -42,7 +46,7 @@
|
||||||
cmd.cmd=addr;
|
cmd.cmd=addr;
|
||||||
if(ioctl(open_smb,SMB_READB,&cmd)==-1){
|
if(ioctl(open_smb,SMB_READB,&cmd)==-1){
|
||||||
perror("IOCTL");
|
perror("IOCTL");
|
||||||
@@ -342,9 +353,13 @@
|
@@ -342,9 +358,13 @@ int WriteByte(int addr, int value)
|
||||||
u_char smb_return;
|
u_char smb_return;
|
||||||
struct smbcmd cmd;
|
struct smbcmd cmd;
|
||||||
cmd.slave=0x5a;
|
cmd.slave=0x5a;
|
||||||
|
|
Loading…
Add table
Reference in a new issue