zfsonlinux/zfs — pull request #767 by ryao (2012-06-01 15:47:13+00:00)
Title: Fix build failures on PaX/GRSecurity patched kernels

Gentoo Hardened kernels use the PaX/GRSecurity, which uses a dialect of
C that relies on a GCC plugin. In particular, struct file_operations has
been marked do_const in the PaX/GRSecurity dialect, which causes GCC to
consider all instances of it as const. This caused failures in the
autotools checks and the ZFS source code.

To address this, we amend the autotools checks to utilize struct
file_operations_no_const and modify the ZFS source code to use memcpy(),
which avoids issues in the PaX/GRSecurity dialect.

Signed-off-by: Richard Yao