-Werror breaks build with 4.9
./include/linux/mmzone.h: In function ‘__nr_to_section’:
./include/linux/mmzone.h:1132:13: warning: the comparison will always evaluate as ‘true’ for the address of ‘mem_section’ will never be NULL [-Waddress]
1132 | if (!mem_section[SECTION_NR_TO_ROOT(nr)])
| ^
./include/linux/mmzone.h:1127:27: note: ‘mem_section’ declared here
1127 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
| ^~~~~~~~~~~
--- /dev/null
+--- zfs-2.1.5/config/kernel.m4~ 2022-06-22 18:55:53.000000000 +0200
++++ zfs-2.1.5/config/kernel.m4 2022-09-24 08:10:59.050219049 +0200
+@@ -581,7 +581,7 @@
+ # Example command line to manually build source
+ # make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/$1
+
+-ccflags-y := -Werror $FRAME_LARGER_THAN
++ccflags-y := $FRAME_LARGER_THAN
+ _ACEOF
+
+ dnl # Additional custom CFLAGS as requested.
%define _duplicate_files_terminate_build 0
-%define rel 1
+%define rel 2
%define pname zfs
Summary: Native Linux port of the ZFS filesystem
Summary(pl.UTF-8): Natywny linuksowy port systemu plików ZFS
# Source0-md5: a1efd694cfa22522c51400b2e8731f25
Patch0: initdir.patch
Patch1: am.patch
+Patch2: no-Werror.patch
URL: https://zfsonlinux.org/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
%setup -q -n %{pname}-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' \
cmd/arc_summary/arc_summary2