Similarly to the first note, aux is a pointer to auxiliary data kept in host byte order. 
Four bytes starting at `aux[4]` are a 4-byte integer value representing the number of elements in an auxiliary data array and byte swapping is done to convert data (counter) from big endian to little endian format before being written out.

PS. With these changes htslib builds fine on both mips and mipsel with all of the tests passing.