diff --git a/iiod/iiod.c b/iiod/iiod.c index 4aca5979d..3f20f5335 100644 --- a/iiod/iiod.c +++ b/iiod/iiod.c @@ -47,6 +47,17 @@ #define IIOD_PORT 30431 +#ifndef __bswap_constant_16 +#define __bswap_constant_16(x) \ + ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) +#endif + +#ifndef __bswap_constant_32 +#define __bswap_constant_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) +#endif + struct client_data { int fd; bool debug;