trace_to_text: make endian functions portable

r.android.com/1454656 broke the Mac build. endiand.h is supported
only on linux. This makes it more portable.

Bug: 162833724
Change-Id: Id1636211b4d10e1808bdbc6e5f8ba56b6da67eba
diff --git a/BUILD b/BUILD
index 3d1f303..e53f27c 100644
--- a/BUILD
+++ b/BUILD
@@ -283,6 +283,7 @@
     srcs = [
         "include/perfetto/ext/base/circular_queue.h",
         "include/perfetto/ext/base/container_annotations.h",
+        "include/perfetto/ext/base/endian.h",
         "include/perfetto/ext/base/event_fd.h",
         "include/perfetto/ext/base/file_utils.h",
         "include/perfetto/ext/base/hash.h",