67 lines
1.5 KiB
Diff
67 lines
1.5 KiB
Diff
|
--- lastcomm.c
|
|||
|
+++ lastcomm.c
|
|||
|
@@ -47,6 +47,7 @@
|
|||
|
#endif
|
|||
|
|
|||
|
#include <pwd.h>
|
|||
|
+#include <unistd.h>
|
|||
|
|
|||
|
#include "common.h"
|
|||
|
#include "uid_hash.h"
|
|||
|
@@ -65,7 +66,7 @@
|
|||
|
int strict_match_flag = 0; /* Nonzero if each record has to match
|
|||
|
all items on the command line */
|
|||
|
int print_controls = 0; /* don't print control characters */
|
|||
|
-int ahz = AHZ; /* for viewing logs from another system */
|
|||
|
+int ahz = 0; /* for viewing logs from another system */
|
|||
|
|
|||
|
char *program_name; /* name of the program, for usage & errs */
|
|||
|
|
|||
|
@@ -91,6 +92,10 @@
|
|||
|
|
|||
|
/* code */
|
|||
|
|
|||
|
+#ifndef HZ
|
|||
|
+# define AHZ sysconf(_SC_CLK_TCK)
|
|||
|
+#endif
|
|||
|
+
|
|||
|
void
|
|||
|
main (int argc, char *argv[])
|
|||
|
{
|
|||
|
@@ -98,6 +103,7 @@
|
|||
|
int other_pacct_file_specified = 0; /* nonzero if the user used the
|
|||
|
`-f' or `--file' flag */
|
|||
|
|
|||
|
+ ahz = AHZ;
|
|||
|
program_name = argv[0];
|
|||
|
|
|||
|
/* Tell the pacct reader that we want to do things backwards! */
|
|||
|
--- sa.c
|
|||
|
+++ sa.c
|
|||
|
@@ -174,7 +174,7 @@
|
|||
|
int print_users = 0;
|
|||
|
int percentages = 0; /* include percentages in printout */
|
|||
|
int user_summary_flag = 0; /* are we printing a user summary? */
|
|||
|
-int ahz = AHZ; /* for viewing logs from another system */
|
|||
|
+int ahz = 0; /* for viewing logs from another system */
|
|||
|
|
|||
|
|
|||
|
#if defined(HAVE_ACUTIME) && defined(HAVE_ACSTIME)
|
|||
|
@@ -265,11 +265,16 @@
|
|||
|
|
|||
|
/* code */
|
|||
|
|
|||
|
+#ifndef HZ
|
|||
|
+# define AHZ sysconf(_SC_CLK_TCK)
|
|||
|
+#endif
|
|||
|
+
|
|||
|
void
|
|||
|
main (int argc, char *argv[])
|
|||
|
{
|
|||
|
int c;
|
|||
|
|
|||
|
+ ahz = AHZ;
|
|||
|
program_name = argv[0];
|
|||
|
|
|||
|
/* Cache the page size of the machine for the PAGES_TO_KB macro */
|