Fix endianness detection when writing a frame

Properly detect endianness at compilation time

This fixes the tests on big-endian machines

Fix: https://gitlab.gnome.org/GNOME/sysprof/issues/7
This commit is contained in:
Laurent Bigonville
2020-01-02 12:39:52 +01:00
parent 0787b8fa64
commit 994b0535ef

View File

@ -499,7 +499,7 @@ sysprof_capture_writer_new_from_fd (int fd,
header->magic = SYSPROF_CAPTURE_MAGIC;
header->version = 1;
#ifdef G_LITTLE_ENDIAN
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
header->little_endian = TRUE;
#else
header->little_endian = FALSE;