summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kozadaev <[email protected]>2023-05-28 20:23:52 +0300
committerDenis Kozadaev <[email protected]>2023-05-28 20:23:52 +0300
commit91235e33ce72207758973dd73ef91f3bcb5122b6 (patch)
treea80688ccc54fb55ce78af407d6f3980e700b4853
parent832a902d96ac6f746307256513487a7f17a29323 (diff)
downloadtdeutils-91235e33ce72207758973dd73ef91f3bcb5122b6.tar.gz
tdeutils-91235e33ce72207758973dd73ef91f3bcb5122b6.zip
SunOS cosmetic changes
Signed-off-by: Denis Kozadaev <[email protected]>
-rw-r--r--ConfigureChecks.cmake4
-rw-r--r--kmilo/delli8k/delli8k.cpp1
-rw-r--r--kmilo/delli8k/i8k.h4
-rw-r--r--kmilo/kmilo_kvaio/kvaiodriverinterface.cpp7
-rw-r--r--kmilo/kmilo_kvaio/sonypi.h2
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 <fcntl.h>
+#include <unistd.h>
#include <sys/ioctl.h>
#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 <sys/ioccom.h>
+#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 <unistd.h>
#include <errno.h>
#include <sys/ioctl.h>
+#ifdef Q_OS_LINUX
#include <linux/types.h>
+#elif defined(Q_OS_SOLARIS)
+#include <sys/ioccom.h>
+#define O_ASYNC O_DIRECT
+typedef uint8_t __u8;
+typedef uint16_t __u16;
+#endif
#include <X11/Xlib.h>
//#include <X11/extensions/XTest.h>
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 <linux/types.h>
+#endif /* Linux */
/* events the user application reading /dev/sonypi can use */