summaryrefslogtreecommitdiffstats
path: root/kmilo
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2023-05-28 20:23:52 +0300
committerDenis Kozadaev <denis@dilos.org>2023-05-28 20:23:52 +0300
commit91235e33ce72207758973dd73ef91f3bcb5122b6 (patch)
treea80688ccc54fb55ce78af407d6f3980e700b4853 /kmilo
parent832a902d96ac6f746307256513487a7f17a29323 (diff)
downloadtdeutils-91235e33ce72207758973dd73ef91f3bcb5122b6.tar.gz
tdeutils-91235e33ce72207758973dd73ef91f3bcb5122b6.zip
SunOS cosmetic changes
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'kmilo')
-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
4 files changed, 14 insertions, 0 deletions
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 */