From 2aafb5dd19f8a3e3436f8843071fa2076a6d2716 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 22 Jun 2017 16:32:47 -0400 Subject: Add wlcore/wl_shm (WIP) --- include/endian.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 include/endian.h (limited to 'include/endian.h') diff --git a/include/endian.h b/include/endian.h new file mode 100644 index 00000000..0e9b6101 --- /dev/null +++ b/include/endian.h @@ -0,0 +1,8 @@ +#ifndef _WLR_ENDIAN_H +#define _WLR_ENDIAN_H + +// https://stackoverflow.com/a/4240257 + +#define little_endian() (((union { unsigned x; unsigned char c; }){1}).c) + +#endif -- cgit v1.2.3