diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-10-05 21:32:28 -0700 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-10-08 21:54:21 +0200 |
commit | 3097d12ba67a51faa4507b6868e3b99f3c0e1096 (patch) | |
tree | 803996e9f14aa3e914c50f6cbf2e4c0dfe86fb46 | |
parent | 7de51b81885a3b6dbb719a63f776783c0e307ab7 (diff) |
Use LE_32 macro from <sys/byteorder.h> on Solaris versions without le32toh()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | cursor/parse_cursor_file.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1510e51..55cc06d 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,8 @@ XCB_UTIL_COMMON([1.4], [1.6]) AM_MISSING_PROG([GPERF], [gperf]) -AC_CHECK_HEADERS([endian.h sys/endian.h], [break]) +AC_CHECK_HEADERS([endian.h sys/endian.h sys/byteorder.h], [break]) +AC_CHECK_FUNCS([le32toh]) PKG_CHECK_MODULES(XCB_RENDER, xcb-render) PKG_CHECK_MODULES(XCB_RENDERUTIL, xcb-renderutil) diff --git a/cursor/parse_cursor_file.c b/cursor/parse_cursor_file.c index 8c52cfe..30f7df5 100644 --- a/cursor/parse_cursor_file.c +++ b/cursor/parse_cursor_file.c @@ -42,6 +42,12 @@ #ifdef HAVE_SYS_ENDIAN_H #include <sys/endian.h> #endif +#ifdef HAVE_SYS_BYTEORDER_H +#include <sys/byteorder.h> +# ifndef HAVE_LE32TOH +# define le32toh(x) LE_32(x) +# endif +#endif #include <xcb/xcb.h> |