From 461b90c341090c46083e83ca59ccb88371e051e4 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 4 Jan 2017 10:45:55 -0800 Subject: Fix dmesg -c and -C. I never use these, so I didn't notice I'd broken them until someone who does bringup complained. The "one weird trick" with SEEK_DATA is documented at the URL we already point to. SEEK_DATA was added in Linux 3.1 (2011) and isn't available in glibc 2.19 (2014), so I've added that to "portability.h" for the benefit of Ubuntu 14.04. Also make -c and -C mutually exclusive. Also fix some of the formatting I introduced earlier. (A clang-format file would help prevent these mistakes...) --- lib/portability.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/portability.h') diff --git a/lib/portability.h b/lib/portability.h index afe02c1c..e0dd914e 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -45,6 +45,10 @@ #define RLIMIT_RTTIME 15 #endif +#ifndef SEEK_DATA +#define SEEK_DATA 3 +#endif + // We don't define GNU_dammit because we're not part of the gnu project, and // don't want to get any FSF on us. Unfortunately glibc (gnu libc) // won't give us Linux syscall wrappers without claiming to be part of the -- cgit v1.2.3