summaryrefslogtreecommitdiffstats
path: root/solaris
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-05-20 18:27:10 +0200
committerChristian Göttsche <cgzones@googlemail.com>2021-05-20 19:16:29 +0200
commitee9e7edbc18cdc37262feae9eb65ee4be68bf52b (patch)
tree6d89122880180fea62e97259360caf18201e2f5f /solaris
parenta62987c7879050cbb09a02437eb1d10ed9352eee (diff)
Solaris: handle ERR macro redefinitions
On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking the Enter key. Since ncruses macros use the ERR macro, we can not use another name. Closes: #634
Diffstat (limited to 'solaris')
-rw-r--r--solaris/Platform.h8
-rw-r--r--solaris/SolarisProcess.h7
2 files changed, 15 insertions, 0 deletions
diff --git a/solaris/Platform.h b/solaris/Platform.h
index cf94fbb3..f83c4d1c 100644
--- a/solaris/Platform.h
+++ b/solaris/Platform.h
@@ -12,7 +12,15 @@ in the source distribution for its full text.
#include "config.h" // IWYU pragma: keep
#include <kstat.h>
+
+/* On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking the Enter key.
+ * Since ncruses macros use the ERR macro, we can not use another name.
+ */
+#undef ERR
#include <libproc.h>
+#undef ERR
+#define ERR (-1)
+
#include <signal.h>
#include <stdbool.h>
diff --git a/solaris/SolarisProcess.h b/solaris/SolarisProcess.h
index 0b12aa0f..07b889c0 100644
--- a/solaris/SolarisProcess.h
+++ b/solaris/SolarisProcess.h
@@ -12,7 +12,14 @@ in the source distribution for its full text.
#include <zone.h>
#include <sys/proc.h>
+
+/* On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking the Enter key.
+ * Since ncruses macros use the ERR macro, we can not use another name.
+ */
+#undef ERR
#include <libproc.h>
+#undef ERR
+#define ERR (-1)
#include "Settings.h"

© 2014-2024 Faster IT GmbH | imprint | privacy policy