libselinux: Fix ARM build failure
Avoid this warning (which is in turn an error via -Werror):
````
avc_internal.c: In function 'avc_netlink_receive':
avc_internal.c:105:25: error: cast increases required alignment of target type [-Werror=cast-align]
struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
^
````
The code allocates abuffer with "__attribute__ ((aligned))",
then passes it via a 'char*' parameter, which is then finally cast,
causing the warning. So the code is ok but compiler is not smart
enough to see it.
It seems that -Wcast-align is a no-op on x86, so this shows up on ARM
only.
This commit is contained in:
parent
0240306d01
commit
ba42683e9a
@ -19,7 +19,13 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ pkgconfig libsepol pcre ]
|
||||
++ optionals enablePython [ swig python ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fstack-protector-all -std=gnu89";
|
||||
# Avoid this false warning:
|
||||
# avc_internal.c: In function 'avc_netlink_receive':
|
||||
# avc_internal.c:105:25: error: cast increases required alignment of target type [-Werror=cast-align]
|
||||
# struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
|
||||
# ^
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-std=gnu89 -Wno-error=cast-align";
|
||||
|
||||
# Unreleased upstream patch that fixes Python package issue arising
|
||||
# from recent SWIG changes.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user