[monitoring-plugins] fixes check_users build on OpenBSD (without utmpx)

Stuart Henderson git at monitoring-plugins.org
Fri Sep 26 18:20:12 CEST 2025


 Module: monitoring-plugins
 Branch: master
 Commit: 5fb0c08cec4122928767e8d58c222865eeeae1d7
 Author: Stuart Henderson <stu at spacehopper.org>
   Date: Fri Sep 26 12:51:42 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=5fb0c08c

fixes check_users build on OpenBSD (without utmpx)

---

 plugins/check_users.c         | 2 --
 plugins/check_users.d/users.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/plugins/check_users.c b/plugins/check_users.c
index 2340eae4..3b2e265e 100644
--- a/plugins/check_users.c
+++ b/plugins/check_users.c
@@ -51,8 +51,6 @@ const char *email = "devel at monitoring-plugins.org";
 #	define ERROR -1
 #elif HAVE_UTMPX_H
 #	include <utmpx.h>
-#else
-#	include "popen.h"
 #endif
 
 #ifdef HAVE_LIBSYSTEMD
diff --git a/plugins/check_users.d/users.c b/plugins/check_users.d/users.c
index f37819b1..a08f79c5 100644
--- a/plugins/check_users.d/users.c
+++ b/plugins/check_users.d/users.c
@@ -113,8 +113,8 @@ get_num_of_users_wrapper get_num_of_users_utmp() {
 #			ifndef HAVE_UTMPX_H
 //  Fall back option here for the others (probably still not on windows)
 
-#				include "../popen.h"
 #				include "../common.h"
+#				include "../popen.h"
 #				include "../utils.h"
 
 get_num_of_users_wrapper get_num_of_users_who_command() {



More information about the Commits mailing list