* lib-src/asset-directory-tool.c (main_2): Port to systems
without htole32.
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
-#include <endian.h>
+#include <byteswap.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
croak ("write");
/* Write the offset. */
- output = htole32 (tree->offset);
+#ifdef WORDS_BIGENDIAN
+ output = bswap_32 (tree->offset);
+#else
+ output = tree->offset;
+#endif
if (write (fd, &output, 4) < 1)
croak ("write");
size += 4;