From 1a47dfc384f96e59700eaba029d3d9eee5b914d9 Mon Sep 17 00:00:00 2001
From: Chase <chinkle3@illinois.edu>
Date: Sun, 30 Nov 2025 09:42:06 -0500
Subject: [PATCH] poll.h: fix ordering

---
 cde/lib/tt/bin/tttrace/tttrace.C     | 6 +++---
 cde/lib/tt/lib/mp/mp_stream_socket.C | 6 +++---
 cde/lib/tt/lib/tttk/tttk.C           | 6 +++---
 cde/lib/tt/lib/util/tt_file_system.C | 6 +++---
 cde/programs/dtscreen/dtscreen.h     | 6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/cde/lib/tt/bin/tttrace/tttrace.C b/cde/lib/tt/bin/tttrace/tttrace.C
index 243d45521..a657aa61e 100644
--- a/cde/lib/tt/bin/tttrace/tttrace.C
+++ b/cde/lib/tt/bin/tttrace/tttrace.C
@@ -41,10 +41,10 @@
 #include <string.h>
 #include <unistd.h>
 #include <signal.h>
-#if HAVE_SYS_POLL_H
-# include <sys/poll.h>
-#elif HAVE_POLL_H
+#if HAVE_POLL_H
 # include <poll.h>
+#elif HAVE_SYS_POLL_H
+# include <sys/poll.h>
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/cde/lib/tt/lib/mp/mp_stream_socket.C b/cde/lib/tt/lib/mp/mp_stream_socket.C
index 3e034fbfe..274808569 100644
--- a/cde/lib/tt/lib/mp/mp_stream_socket.C
+++ b/cde/lib/tt/lib/mp/mp_stream_socket.C
@@ -37,10 +37,10 @@
 #include "tt_options.h"
 #include <stdio.h>
 #include "mp/mp_stream_socket.h"
-#if HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#elif HAVE_POLL_H
+#if HAVE_POLL_H
 #include <poll.h>
+#elif HAVE_SYS_POLL_H
+#include <sys/poll.h>
 #endif
 #include <sys/socket.h>
 #include <fcntl.h>
diff --git a/cde/lib/tt/lib/tttk/tttk.C b/cde/lib/tt/lib/tttk/tttk.C
index e351d6a57..7989fda94 100644
--- a/cde/lib/tt/lib/tttk/tttk.C
+++ b/cde/lib/tt/lib/tttk/tttk.C
@@ -28,10 +28,10 @@
 #if HAVE_CONFIG_H
 #include <cde_config.h>
 #endif
-#if HAVE_SYS_POLL_H
-# include <sys/poll.h>
-#elif HAVE_POLL_H
+#if HAVE_POLL_H
 # include <poll.h>
+#elif HAVE_SYS_POLL_H
+# include <sys/poll.h>
 #endif
 #include <errno.h>
 #include <unistd.h>
diff --git a/cde/lib/tt/lib/util/tt_file_system.C b/cde/lib/tt/lib/util/tt_file_system.C
index 4cab26ed4..c39e30699 100644
--- a/cde/lib/tt/lib/util/tt_file_system.C
+++ b/cde/lib/tt/lib/util/tt_file_system.C
@@ -49,10 +49,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
-#if HAVE_SYS_POLL_H
-# include <sys/poll.h>
-#elif HAVE_POLL_H
+#if HAVE_POLL_H
 # include <poll.h>
+#elif HAVE_SYS_POLL_H
+# include <sys/poll.h>
 #endif
 #include <sys/stat.h>
 #include <fcntl.h>
diff --git a/cde/programs/dtscreen/dtscreen.h b/cde/programs/dtscreen/dtscreen.h
index 7f80759d9..ce74f1969 100644
--- a/cde/programs/dtscreen/dtscreen.h
+++ b/cde/programs/dtscreen/dtscreen.h
@@ -93,10 +93,10 @@ extern void unhide_hft_ring();
 
 #if defined (SYSV) || defined (SVR4)
 
-#if HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#elif HAVE_POLL_H
+#if HAVE_POLL_H
 #include <poll.h>
+#elif HAVE_SYS_POLL_H
+#include <sys/poll.h>
 #endif
 
 #include <sys/time.h>
