cmake: fix clang build and few minor fixes
Change-Id: If5b850c939f7a5383f9a7eff8ac41708c3428a90
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ae71007..8757053 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,6 +30,11 @@
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS_COMMON} -DCLIB_DEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS_COMMON}")
+check_c_compiler_flag("-Wno-address-of-packed-member" compiler_flag_no_address_of_packed_member)
+if (compiler_flag_no_address_of_packed_member)
+ add_definitions(-Wno-address-of-packed-member)
+endif()
+
##############################################################################
# install config
##############################################################################