--- libaitio/src/Attic/vars.c 2011/08/31 16:51:21 1.1.2.4 +++ libaitio/src/Attic/vars.c 2011/09/07 01:26:08 1.1.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: vars.c,v 1.1.2.4 2011/08/31 16:51:21 misho Exp $ +* $Id: vars.c,v 1.1.2.5 2011/09/07 01:26:08 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -175,7 +175,11 @@ io_buffer2vals(u_char *buf, int buflen, int vnum, int io_arraySet(vars, i, val); val->val_type = v[i].val_type; +#if defined(__OpenBSD__) AIT_LEN(val) = betoh32(AIT_LEN(&v[i])); +#else + AIT_LEN(val) = be32toh(AIT_LEN(&v[i])); +#endif switch (AIT_TYPE(val)) { case blob: @@ -189,7 +193,11 @@ io_buffer2vals(u_char *buf, int buflen, int vnum, int case u16: case u32: case u64: +#if defined(__OpenBSD__) val->val.net = betoh64(v[i].val.net); +#else + val->val.net = be64toh(v[i].val.net); +#endif break; case buffer: case string: