From: Ian Jackson Date: Sun, 26 Oct 2014 23:45:05 +0000 (+0000) Subject: Use different struct acct, and different headers, on different platforms. X-Git-Tag: debian/4.4.1~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=46fa88e7747c8dc5861897e2b5aaeed4c43c4ab7 Use different struct acct, and different headers, on different platforms. --- diff --git a/cprogs/acctdump.c b/cprogs/acctdump.c index 8745f08..5668402 100644 --- a/cprogs/acctdump.c +++ b/cprogs/acctdump.c @@ -32,9 +32,32 @@ #include typedef unsigned long long u64; + + +/* Sadly this thing is not very portable */ + +#if defined(__linux__) + +#include #include + typedef struct acct_v3 struct_acct; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + +#include +#include +#include + +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; diff --git a/debian/changelog b/debian/changelog index 99e5999..e140080 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ chiark-utils (4.4.1) unstable; urgency=low Portability fixes for acctdump: * Do not build on platforms with no + * Use different struct acct, and different headers, on different + platforms. --