Hi, Patch #1 creates new put_unaligned and get_unaligned macros which can convert between big-endian or little-endian values. The macros are copied from kernel.
Patch #2 adds the alignment macros into gdhcp code. Patch #3 downgrades cast-align and unused-value errors into warnings so that we can compile connman using clang. Eventually we should either change connman code or do some voodoo magic with clang and enable the errors back. Cheers, Jukka Jukka Rissanen (3): core: Add unalignment macros gdhcp: Use unalignment macros from unaligned.h build: Ignore cast-align and unused-value errors if clang is used Makefile.am | 7 ++- configure.ac | 6 +++ gdhcp/client.c | 17 +++----- gdhcp/common.c | 19 +++++++-- gdhcp/common.h | 16 ------- gdhcp/server.c | 8 ++-- include/unaligned.h | 54 +++++++++++++++++++++++ include/unaligned_be_byteshift.h | 90 +++++++++++++++++++++++++++++++++++++++ include/unaligned_be_struct.h | 58 +++++++++++++++++++++++++ include/unaligned_generic.h | 90 +++++++++++++++++++++++++++++++++++++++ include/unaligned_le_byteshift.h | 90 +++++++++++++++++++++++++++++++++++++++ include/unaligned_le_struct.h | 58 +++++++++++++++++++++++++ include/unaligned_packed_struct.h | 66 ++++++++++++++++++++++++++++ 13 files changed, 544 insertions(+), 35 deletions(-) create mode 100644 include/unaligned.h create mode 100644 include/unaligned_be_byteshift.h create mode 100644 include/unaligned_be_struct.h create mode 100644 include/unaligned_generic.h create mode 100644 include/unaligned_le_byteshift.h create mode 100644 include/unaligned_le_struct.h create mode 100644 include/unaligned_packed_struct.h -- 1.7.11.4 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman