➜ ccp-kernel git:(master) make
make -C /lib/modules/5.6.3-arch1-1/build M=/home/oocococo/Tools/ccp/ccp-kernel modules
make[1]: Entering directory '/usr/lib/modules/5.6.3-arch1-1/build'
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/libccp/serialize.o
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/libccp/ccp_priv.o
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/libccp/machine.o
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/libccp/ccp.o
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/ccpkp/ccpkp.o
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/ccpkp/lfq/lfq.o
CC [M] /home/oocococo/Tools/ccp/ccp-kernel/tcp_ccp.o
/home/oocococo/Tools/ccp/ccp-kernel/tcp_ccp.c: In function ‘ccp_now’:
/home/oocococo/Tools/ccp/ccp-kernel/tcp_ccp.c:78:5: error: implicit declaration of function ‘getnstimeofday64’ [-Werror=implicit-function-declaration]
78 | getnstimeofday64(&now);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:268: /home/oocococo/Tools/ccp/ccp-kernel/tcp_ccp.o] Error 1
make[1]: *** [Makefile:1683: /home/oocococo/Tools/ccp/ccp-kernel] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.6.3-arch1-1/build'
make: *** [Makefile:36: all] Error 2
and after some reference, it seems the function getnstimeofday() had been deprecated and can not be used on v5.6.3, the replacement is ktime_get_real_ts64(), it's been supported since v4.14 (I didn't check kernel older than it).
So I replace all the four getnstimeofday64(&now) with ktime_get_real_ts64(&now), and it works.
while compiling
and after some reference, it seems the function getnstimeofday() had been deprecated and can not be used on v5.6.3, the replacement is ktime_get_real_ts64(), it's been supported since v4.14 (I didn't check kernel older than it). So I replace all the four getnstimeofday64(&now) with ktime_get_real_ts64(&now), and it works.