NICMx / Jool

SIIT and NAT64 for Linux
GNU General Public License v2.0
326 stars 66 forks source link

Add support for kernel 4.11 #244

Closed ydahhrk closed 7 years ago

LuPo commented 7 years ago

it does not compile with DKMS on kernel 4.11

DKMS make.log for jool-3.5.3.git.v3.5.3 for kernel 4.11.2-1-ARCH (x86_64) Wed May 24 09:56:01 SAST 2017 make: Entering directory '/usr/lib/modules/4.11.2-1-ARCH/build' CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/pool4/empty.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/pool4/db.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/pool4/rfc6056.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/bib/db.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/bib/entry.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/bib/pkt_queue.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/timer.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/fragment_db.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/determine_incoming_tuple.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/filtering_and_updating.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/compute_outgoing_tuple.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/handling_hairpinning.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/nf_hook.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/impersonator.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/joold.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../../common/stateful/xlat.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../../common/netlink/config.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/rfc6145/4to6.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/rfc6145/6to4.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/rfc6145/common.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/rfc6145/core.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/address.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/atomic_config.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/types.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/str_utils.o CC [M] /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/packet.o In file included from ./include/linux/kernel.h:13:0, from ./include/linux/list.h:8, from ./include/linux/preempt.h:10, from ./include/linux/spinlock.h:50, from ./include/linux/kref.h:18,
from /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../../include/nat64/mod/common/atomic_config.h: 4,
from /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/atomic_config.c:1: /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/atomic_config.c: In function 'cfgcandidate_print_refcount': /var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/atomic_config.c:448:44: error: passing argument 1 of 'atomi c_read' from incompatible pointer type [-Werror=incompatible-pointer-types] log_info("cfg candidate: %d", atomic_read(&candidate->refcount.refcount)); ^
./include/linux/printk.h:308:34: note: in definition of macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~
/var/lib/dkms/jool/3.5.3.git.v3.5.3/build/mod/stateful/../common/atomic_config.c:448:2: note: in expansion of macro 'log_inf o'
log_info("cfg candidate: %d", atomic_read(&candidate->refcount.refcount)); ^~~~
In file included from ./arch/x86/include/asm/msr.h:66:0,
from ./arch/x86/include/asm/processor.h:20,

ydahhrk commented 7 years ago

Ha... dead code comes back to bite me. Ironic, considering I've been criticizing other people's code over this topic lately.

Quick workaround: Delete those functions. No need to worry about callers: