[Banana Pi BPI-M5] Need help compiling watchdog driver

Hello, I installed watchdog, but whenever I try to start service I get modprobe: FATAL: Module softdog not found in directory /lib/modules/4.9.241-BPI-M5

Tried to follow these steps : https://github.com/ayufan-rock64/linux-build/issues/191#issuecomment-460211682 , but whenever I run “make”, I get the following error

/home/myhome/amlogic-linux/drivers/watchdog/watchdog_core.c:29:21: error: expected ‘)’ before ‘KBUILD_MODNAME’

Please can anyone help me with this ?

For my understanding the compiler is making an error in this define:

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Open the file and check it syntax is written correctly. Maybe the version cloned, or the master has that file broken. I don’t know this driver, but many times I had problems with cloned repositories where the version checkouted on the clone.

I copy that line from release-4.4.190