From: Bernhard Weiss Date: Sat, 24 Sep 2005 16:17:56 +0000 (+0200) Subject: Fix linux_io.h for MIPS X-Git-Tag: mandriva-1.22~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e7781fdafd69d34e2ae305131d65726d9c1add4;p=thirdparty%2Fchrony.git 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). --- diff --git a/io_linux.h b/io_linux.h index b686c135..603898c7 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