#include <sys/stat.h>
typedef unsigned long long u64;
+
+
+/* Sadly this thing is not very portable */
+
+#if defined(__linux__)
+
+#include <sys/types.h>
#include <sys/acct.h>
+
typedef struct acct_v3 struct_acct;
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/acct.h>
+
+typedef struct acctv2 struct_acct;
+
+#else
+
+#error Do not know what struct_acct to use on this platform
+
+#endif
+
+
#include "myopt.h"
static int forwards, nobanner, usestdin, raw, usages;
Portability fixes for acctdump:
* Do not build on platforms with no <sys/acct.h>
+ * Use different struct acct, and different headers, on different
+ platforms.
--