summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp/files/patch-hr_system.c
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/net-snmp/files/patch-hr_system.c')
-rw-r--r--net-mgmt/net-snmp/files/patch-hr_system.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp/files/patch-hr_system.c b/net-mgmt/net-snmp/files/patch-hr_system.c
new file mode 100644
index 000000000000..ee1f01228bfd
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-hr_system.c
@@ -0,0 +1,23 @@
+--- agent/mibgroup/host/hr_system.c.orig Fri Nov 14 14:45:55 2003
++++ agent/mibgroup/host/hr_system.c Fri Nov 14 14:46:01 2003
+@@ -276,11 +276,10 @@
+ struct utmp *utmp_p;
+ #endif
+
++#ifndef UTMP_HAS_NO_TYPE
+ setutent();
+ while ((utmp_p = getutent()) != NULL) {
+-#ifndef UTMP_HAS_NO_TYPE
+ if (utmp_p->ut_type == USER_PROCESS) {
+-#endif
+ /* This block of code fixes zombie user PIDs in the
+ utmp/utmpx file that would otherwise be counted as a
+ current user */
+@@ -293,6 +292,7 @@
+ }
+ }
+ endutent();
++#endif
+ return total;
+ }
+