#include <sys/xattr.h>
-#include <architecture/byte_order.h>
+#include <libkern/OSByteOrder.h>
#include <vm/vm_kern.h>
/*
((u_int8_t *)ATTR_NEXT(ae) <= ((ai).rawdata + (ai).rawsize))
-#define SWAP16(x) NXSwapBigShortToHost((x))
-#define SWAP32(x) NXSwapBigIntToHost((x))
-#define SWAP64(x) NXSwapBigLongLongToHost((x))
+#define SWAP16(x) OSSwapBigToHostInt16((x))
+#define SWAP32(x) OSSwapBigToHostInt32((x))
+#define SWAP64(x) OSSwapBigToHostInt64((x))
static u_int32_t emptyfinfo[8] = {0};
uio_addiov(auio, (uintptr_t)ainfop->filehdr, ainfop->iosize);
swap_adhdr(ainfop->filehdr);
+ if (ainfop->attrhdr != NULL)
swap_attrhdr(ainfop->attrhdr);
error = VNOP_WRITE(ainfop->filevp, auio, 0, ainfop->context);
swap_adhdr(ainfop->filehdr);
+ if (ainfop->attrhdr != NULL)
swap_attrhdr(ainfop->attrhdr);
return (error);
}