copy_to_user undefined in linux kernel version 4.12.8
You should use
#include <linux/uaccess.h>
for 4.12.8. Here is the definition.In 4.4 some drivers use
#include <asm/uaccess.h>
whilst the others use#include <linux/uaccess.h>
.#include <linux/uaccess.h>
is preferable, I think.You should do
apt-get update
and thenapt-get install linux-headers-generic
.