From 365df97fda0b511dbee97c3a7be84bc436b67a42 Mon Sep 17 00:00:00 2001 From: Denis Kozadaev Date: Sun, 28 May 2023 20:23:52 +0300 Subject: SunOS cosmetic changes Signed-off-by: Denis Kozadaev (cherry picked from commit 91235e33ce72207758973dd73ef91f3bcb5122b6) --- ConfigureChecks.cmake | 4 ++-- kmilo/delli8k/delli8k.cpp | 1 + kmilo/delli8k/i8k.h | 4 ++++ kmilo/kmilo_kvaio/kvaiodriverinterface.cpp | 7 +++++++ kmilo/kmilo_kvaio/sonypi.h | 2 ++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 01e91ae..0a91701 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -151,9 +151,9 @@ if ( BUILD_KSIM ) check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H ) check_include_file( "mntent.h" HAVE_MNTENT_H ) check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H ) - check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H ) + check_include_files( "stdio.h;sys/mnttab.h" HAVE_SYS_MNTTAB_H ) - check_include_file( "sys/loadavg.h" HAVE_SYS_LOADAVG_H ) + check_include_files( "sys/time.h;sys/loadavg.h" HAVE_SYS_LOADAVG_H ) check_function_exists( getloadavg HAVE_GETLOADAVG ) check_function_exists( statfs HAVE_STATFS ) check_function_exists( statvfs HAVE_STATVFS ) diff --git a/kmilo/delli8k/delli8k.cpp b/kmilo/delli8k/delli8k.cpp index d63c8c7..e647d89 100644 --- a/kmilo/delli8k/delli8k.cpp +++ b/kmilo/delli8k/delli8k.cpp @@ -31,6 +31,7 @@ #include "kmilointerface.h" #include +#include #include #include "i8k.h" diff --git a/kmilo/delli8k/i8k.h b/kmilo/delli8k/i8k.h index 1c45ba5..a8b16fd 100644 --- a/kmilo/delli8k/i8k.h +++ b/kmilo/delli8k/i8k.h @@ -20,6 +20,10 @@ #define I8K_PROC "/proc/i8k" #define I8K_PROC_FMT "1.0" +#ifdef Q_OS_SOLARIS +#include +#endif + #define I8K_BIOS_VERSION _IOR ('i', 0x80, int) /* broken: meant 4 bytes */ #define I8K_MACHINE_ID _IOR ('i', 0x81, int) /* broken: meant 16 bytes */ #define I8K_POWER_STATUS _IOR ('i', 0x82, size_t) diff --git a/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp b/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp index c10c11c..eb8c5e4 100644 --- a/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp +++ b/kmilo/kmilo_kvaio/kvaiodriverinterface.cpp @@ -29,7 +29,14 @@ extern "C" { #include #include #include +#ifdef Q_OS_LINUX #include +#elif defined(Q_OS_SOLARIS) +#include +#define O_ASYNC O_DIRECT +typedef uint8_t __u8; +typedef uint16_t __u16; +#endif #include //#include diff --git a/kmilo/kmilo_kvaio/sonypi.h b/kmilo/kmilo_kvaio/sonypi.h index 43cfc80..658c5ed 100644 --- a/kmilo/kmilo_kvaio/sonypi.h +++ b/kmilo/kmilo_kvaio/sonypi.h @@ -36,7 +36,9 @@ #ifndef _SONYPI_H_ #define _SONYPI_H_ +#ifdef Q_OS_LINUX #include +#endif /* Linux */ /* events the user application reading /dev/sonypi can use */ -- cgit v1.2.1