From 2189c49e5f192af1255b790fed00adaba6e0970b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Oct 2014 23:48:52 +0000 Subject: [PATCH] Tolerate variation in ac_flag field name, and, to an extent, value. --- cprogs/acctdump.c | 4 +++- debian/changelog | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cprogs/acctdump.c b/cprogs/acctdump.c index 35acfb3..77e1896 100644 --- a/cprogs/acctdump.c +++ b/cprogs/acctdump.c @@ -44,6 +44,7 @@ typedef unsigned long long u64; typedef struct acct_v3 struct_acct; #define HAVE_AC_EXITCODE #define HAVE_AC_FLT +#define FIELD_AC_FLAG(as) ((as)->ac_flag) #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -52,6 +53,7 @@ typedef struct acct_v3 struct_acct; #include typedef struct acctv2 struct_acct; +#define FIELD_AC_FLAG(as) ((as)->ac_flagx & ~ANVER) #else @@ -245,7 +247,7 @@ static void printrecord(const struct_acct *as, const char *filename) { } } - r= as->ac_flag; + r= FIELD_AC_FLAG(as); for (i=1, fp= "FS4DX"; *fp; fp++, i<<=1) { if (r&i) { putchar(*fp); diff --git a/debian/changelog b/debian/changelog index 644c984..58d6224 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ chiark-utils (4.4.1) unstable; urgency=low platforms. * Tolerate lack of ac_exitcode. * Tolerate lack of ac_minflt and ac_majflt (and use %lu as is right). + * Tolerate variation in ac_flag field name, and, to an extent, value. -- -- 2.30.2