From 3e7781fdafd69d34e2ae305131d65726d9c1add4 Mon Sep 17 00:00:00 2001 From: Bernhard Weiss Date: Sat, 24 Sep 2005 18:17:56 +0200 Subject: [PATCH] Fix linux_io.h for MIPS Bernard Weiss writes: I managed to compile the chrony 1.21 package for the MIPS architecture. For the package to compile I had to add the following lines to io_linux.h: [patch] These values are taken from the ioctl.h file of linux 2.4.30 for the MIPS arch (__ASM_MIPS_IOCTL_H). --- io_linux.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/io_linux.h b/io_linux.h index b686c13..603898c 100644 --- a/io_linux.h +++ b/io_linux.h @@ -15,7 +15,8 @@ #define CHRONY_IOC_NONE 0U #define CHRONY_IOC_WRITE 1U #define CHRONY_IOC_READ 2U -#elif defined(__alpha__) || defined(__sparc__) || defined(__mips__) || defined(__ppc__) || defined(__ppc64__) || defined(__sparc64__) + +#elif defined(__alpha__) || defined(__sparc__) || defined(__ppc__) || defined(__ppc64__) || defined(__sparc64__) #define CHRONY_IOC_NRBITS 8 #define CHRONY_IOC_TYPEBITS 8 #define CHRONY_IOC_SIZEBITS 13 @@ -24,6 +25,16 @@ #define CHRONY_IOC_NONE 1U #define CHRONY_IOC_READ 2U #define CHRONY_IOC_WRITE 4U + +#elif defined(__mips__) || defined(__mips32__) +#define CHRONY_IOC_NRBITS 8 +#define CHRONY_IOC_TYPEBITS 8 +#define CHRONY_IOC_SIZEBITS 13 +#define CHRONY_IOC_DIRBITS 3 +#define CHRONY_IOC_NONE 1U +#define CHRONY_IOC_READ 2U +#define CHRONY_IOC_WRITE 4U + #else #error "I don't know the values of the _IOC_* constants for your architecture" #endif