编译驱动,报错:implicit declaration of function “copy_form_user”

                                     implicit declaration of function “copy_to_user”

        原因很简单是缺少头文件。

添加头文件即可:

       #include <linux/uaccess.h>

报错:

Linux驱动编译错误:implicit declaration of function “copy_form_user”,“copy_to_user“

解决:

Linux驱动编译错误:implicit declaration of function “copy_form_user”,“copy_to_user“

PS:有的网友提到添加#include <linux/uaccess.h>。

对于这个问题,参考这篇文章:https://blog.csdn.net/qq_40421682/article/details/97261197

  1. 在3.3版本之后的内核编译中,用#include <asm/switch_to.h>代替#include <asm/system.h>
  2. 用#include <generated/autoconf.h>代替#include <linux/autoconf.h>
  3. 用#include <linux/uaccess.h>代替#include <asm/uaccess.h>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-03
  • 2021-04-25
  • 2021-12-15
  • 2022-12-23
  • 2021-06-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案