Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
+2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Older OS compatibility bits.
+ * linux-core-attach.c (be64toh, le64toh, be32toh, le32toh): Provide
+ fallbacks if not defined by system.
+
2013-11-09 Jan Kratochvil <jan.kratochvil@redhat.com>
Handle T-stopped detach for old kernels.
#include "libdwflP.h"
#include <fcntl.h>
#include "system.h"
+#include <endian.h>
+#include <byteswap.h>
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# ifndef be64toh
+# define be64toh(x) bswap_64 (x)
+# endif
+# ifndef le64toh
+# define le64toh(x) (x)
+# endif
+# ifndef be32toh
+# define be32toh(x) bswap_32 (x)
+# endif
+# ifndef le32toh
+# define le32toh(x) (x)
+# endif
+#else
+# ifndef be64toh
+# define be64toh(x) (x)
+# endif
+# ifndef le64toh
+# define le64toh(x) bswap_64 (x)
+# endif
+# ifndef be32toh
+# define be32toh(x) (x)
+# endif
+# ifndef le32toh
+# define le32toh(x) bswap_32 (x)
+# endif
+#endif
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))