Patch by Robert Jacobs <[email protected]>.
From:
https://bugs.debian.org/306536
---
wmlongrun/ChangeLog | 1 +
wmlongrun/src/longrun_linux.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/wmlongrun/ChangeLog b/wmlongrun/ChangeLog
index eda37c6..a06fa39 100644
--- a/wmlongrun/ChangeLog
+++ b/wmlongrun/ChangeLog
@@ -8,6 +8,7 @@
* Replace INCLUDES and CPPFLAGS with AM_CPPFLAGS to fix warnings.
* Detect GNU/kFreeBSD during build.
* Update README with new contact info and url.
+ * Update for modern kernels.
2002 March 23
* version 0.2.0 released
diff --git a/wmlongrun/src/longrun_linux.c b/wmlongrun/src/longrun_linux.c
index 4b66e19..89227eb 100644
--- a/wmlongrun/src/longrun_linux.c
+++ b/wmlongrun/src/longrun_linux.c
@@ -22,6 +22,7 @@
#ifdef USE_PREAD
#define __USE_UNIX98 /* for pread/pwrite */
#endif
+#define __USE_FILE_OFFSET64 /* msr/cpuid needs 64bit address with newer
linuxes */
#include <unistd.h>
#include "common.h"
@@ -45,7 +46,7 @@ static int msr_fd; /* MSR file descriptor
*/
static char *msr_device; /* MSR device name */
static void
-read_cpuid(long address, int *eax, int *ebx, int *ecx, int *edx)
+read_cpuid(loff_t address, int *eax, int *ebx, int *ecx, int *edx)
{
uint32_t data[4];
@@ -75,7 +76,7 @@ read_cpuid(long address, int *eax, int *ebx, int *ecx, int
*edx)
/* note: if an output is NULL, then don't set it */
static void
-read_msr(long address, int *lower, int *upper)
+read_msr(loff_t address, int *lower, int *upper)
{
uint32_t data[2];
--
2.7.4
--
To unsubscribe, send mail to [email protected].