错误: 初始值设定项里有未知的字段‘ioctl’

关于ABAQUS使用子程序出现“libirc.lib(fast_mem_ops.obj) : warning LNK4210”错误 ** (关于ABAQUS使用子程序出现“libirc.lib(fast_mem_ops.obj) : warning LNK4210”错误) ** 真的是一个疑难杂症 本人在进行有限元仿真时,前期工作都已经搞定了,什么子程序关联啊,其实子程序关联什么的都是最简单的。但是到了后期在使用子程序的时候出现了错误。该错误如下“End Compiling Abaqus/Standard User Subroutines Begin Linking Abaqus/Standard User Subroutines 正在 阅读详情
这个错误网上搜索发现3.0.0.15版本内核 file_operation结构体已经删除了ioctl函数,取代的是:
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);

file_operation结构体在 /usr/src/linux-3.0.0.15/include/linux/fs.h定义。

[plain] view plain copy
  1. 1546 struct file_operations {  
  2. 1547         struct module *owner;  
  3. 1548         loff_t (*llseek) (struct file *, loff_t, int);  
  4. 1549         ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);  
  5. 1550         ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);  
  6. 1551         ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);  
  7. 1552         ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);  
  8. 1553         int (*readdir) (struct file *, void *, filldir_t);  
  9. 1554         unsigned int (*poll) (struct file *, struct poll_table_struct *);  
  10. 1555         long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);  
  11. 1556         long (*compat_ioctl) (struct file *, unsigned int, unsigned long);  
  12. 1557         int (*mmap) (struct file *, struct vm_area_struct *);  
  13. 1558         int (*open) (struct inode *, struct file *);  
  14. 1559         int (*flush) (struct file *, fl_owner_t id);  
  15. 1560         int (*release) (struct inode *, struct file *);  
  16. 1561         int (*fsync) (struct file *, int datasync);  
  17. 1562         int (*aio_fsync) (struct kiocb *, int datasync);  
  18. 1563         int (*fasync) (int, struct file *, int);  
  19. 1564         int (*lock) (struct file *, int, struct file_lock *);  
  20. 1565         ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);  
  21. 1566         unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);  
  22. 1567         int (*check_flags)(int);  
  23. 1568         int (*flock) (struct file *, int, struct file_lock *);  
  24. 1569         ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);  
  25. 1570         ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);  
  26. 1571         int (*setlease)(struct file *, long, struct file_lock **);  
  27. 1572         long (*fallocate)(struct file *file, int mode, loff_t offset,  
  28. 1573                           loff_t len);  
  29. 1574 };  

2.6.30.4中file_operation的定义如下:
[plain] view plain copy
  1. 1484 struct file_operations {  
  2. 1485         struct module *owner;  
  3. 1486         loff_t (*llseek) (struct file *, loff_t, int);  
  4. 1487         ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);  
  5. 1488         ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);  
  6. 1489         ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);  
  7. 1490         ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);  
  8. 1491         int (*readdir) (struct file *, void *, filldir_t);  
  9. 1492         unsigned int (*poll) (struct file *, struct poll_table_struct *);  
  10. 1493         int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);  
  11. 1494         long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);  
  12. 1495         long (*compat_ioctl) (struct file *, unsigned int, unsigned long);  
  13. 1496         int (*mmap) (struct file *, struct vm_area_struct *);  
  14. 1497         int (*open) (struct inode *, struct file *);  
  15. 1498         int (*flush) (struct file *, fl_owner_t id);  
  16. 1499         int (*release) (struct inode *, struct file *);  
  17. 1500         int (*fsync) (struct file *, struct dentry *, int datasync);  
  18. 1501         int (*aio_fsync) (struct kiocb *, int datasync);  
  19. 1502         int (*fasync) (int, struct file *, int);  
  20. 1503         int (*lock) (struct file *, int, struct file_lock *);  
  21. 1504         ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);  
  22. 1505         unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);  
  23. 1506         int (*check_flags)(int);  
  24. 1507         int (*flock) (struct file *, int, struct file_lock *);  
  25. 1508         ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);  
  26. 1509         ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);  
  27. 1510         int (*setlease)(struct file *, long, struct file_lock **);  
  28. 1511 };  

在file_operation 赋值处修改:
.unlocked_ioctl = xxx_ioctl
rtl8111/8168系列pcie网卡 linux驱动 RTL8111B/RTL8168B/RTL8111/RTL8168 RTL8111C/RTL8111CP/RTL8111D(L) RTL8168C/RTL8111DP/RTL8111E RTL8168E/RTL8111F/RTL8411 RTL8111G/RTL8111GUS/RTL8411B(N) RTL8118AS Unix (Linux) Apply to RTL8111H(S)/RTL8118/RTL8119i as well. LINUX driver for kernel up to 4.7 2017年2月13日版 立即下载

相关推荐

MSVBCRT.AIO.2019.07.20.X86 X64.rar

[Windows] 常用运行库合集 ----中文免费最新版 运行库就是支持大部分程序运行的基础,由于很多常用软件都是采用 Microsoft Visual Studio 编写的,所以这类软件的运行需要依赖微软Visual C++运行库,比如像 QQ、迅雷、Adobe 软件等等,如果没有安装VC++运行库或者安装的版本不完整,就可能会导致这些软件启动时报错,提示缺少库文件。然而,很多朋友却不知道到底要安装哪些运行库版本。微软常用运行库合集就是为了解决安装运行库的难题。此微软系统运行库集合包整合了目前最新的、最常用的VC运行库版本,一键全部安装,方便操作,堪称装机必备神器

warning LNK4210 存在 .CRT 节 可能有未处理的静态初始值设定项或结束符

warning LNK4210: 存在 .CRT 节;可能有未处理的静态初始值设定项或结束符 不要在自己的结构体定义内对成员进行初始化赋值。 改在定义变量时对其赋值即可。 此警告所产生的问题可能会导致在结构体定义内对成员的初始化赋值失败。 ...

Sprite雪碧 8130

tuts4you-lena151-Crackme-tutorial06

一、前言      本次研究的是lena151-Crackme-tutorial06,也是一个应用程序,但因为平台迭代的关系,程序不能正常运行,只能完成部分破解。 (一)·本次我们要破解的目标是个应用程序,如下图 (二)、使用工具:x32dbg 二、过程 这个程序的破解的方法很多,首先最简单的一种不外乎就是搜索字符串,我就按照这个思路来完成。 (一)查找字符串<Unregis...

h123120的专栏 518

Centos7安装DPDK

目录 Centos7安装DPDK 1系统准备工作 1.1查看Linux机器是否为NUMA结构 1.2大页内存的挂载和分配 1.3加载启动dpdk需要的uio功能 1.4网络端口绑定和解绑定到内核驱动模块 2.安装依赖包 3.解压与编译运行 4.问题与解决方法 4.1make: *** /lib/modules/3.10.0-229.el7.x86_64/build: 没有那个文...

暗焰之珩的博客 3244

Zotero PDF Translate插件实战:DeepL API免费申请与高效翻译配置指南

本文提供Zotero PDF Translate插件配置DeepL API的完整实战指南。详细介绍了如何免费申请DeepL API密钥,解决国内访问问题,并在插件中完成精细配置,实现文献阅读时的无缝划词翻译,大幅提升科研人员和学生的英文文献阅读效率。

rum55的博客 456

告别复杂配置!5分钟在Vue/React项目中集成讯飞语音听写WebSocket API

本文详细介绍了如何在Vue/React项目中快速集成讯飞语音听写WebSocket API,实现高效语音识别功能。通过对比不同通信方案,突出WebSocket在实时语音交互中的优势,并提供框架适配、音频处理及性能优化等关键技术点,帮助开发者5分钟内完成专业级语音听写功能集成。

weixin_28730353的博客 274

warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators

郁闷的是在编译后没有error的情况下 给你再来个警告,一般警告我们意识的就是忽略。但下面一个你是不能忽略的 warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators 这个解决办法是你在Entry point 里面写东西了,你把他个清空就OK了 ,呵呵

joimson的专栏 5140

【AI实战派】从零部署YOLOv8:香橙派AIpro边缘端目标检测全流程解析

本文详细解析了在香橙派AIpro边缘设备上从零部署YOLOv8目标检测模型的全流程。内容涵盖硬件开箱、环境搭建、模型转换(ONNX到昇腾OM格式)以及编写Python推理脚本,并提供了性能优化与实战技巧,帮助开发者高效实现实时边缘AI应用。

weixin_29183637的博客 327

【驱动】——错误: 初始值设定项里有未知的字段‘ioctl’

这个错误网上搜索发现3.0.0.15版本内核 file_operation结构体已经删除了ioctl函数,取代的是: long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); fi...

weixin_33736048的博客 184

Qt6.10 | Qt Bluetooth 蓝牙

本文介绍了QtBluetooth模块的功能和使用方法,包括蓝牙API概述、构建配置(CMake/qmake)、权限管理、平台支持(Linux/macOS特殊处理)、日志设置及许可信息。重点说明Linux平台的后端选择机制,以及macOS上的依赖限制。最后提及蓝牙聊天示例,展示RFCOMM协议通信的实现。全文提供了蓝牙开发的技术要点和注意事项。

Qt历险记,专注Qt技术,三年医疗设备研发经验,1年机器视觉研发经验,半年柔性传感研发经验。 399

踩遍Windows所有坑:Codex CLI桌面端+命令行双环境安装避坑实战

Windows下装Codex CLI的坑,本质上都是Windows本身的路径、环境变量、权限、编码这些历史遗留问题,和工具本身关系不大。只要避开中文路径、正确配置PATH、注意终端环境差异,其实安装非常简单。这套双环境方案配好之后,桌面端适合可视化调试、多会话管理,终端适合嵌入编辑器、脚本调用,一套配置两边通用,体验还是很流畅的。按照上面的流程走,基本不会出大问题,就算出问题也能在排查表里找到对应解法。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 298

Ioctl设备方法学习中遇到的一些问题

Ioctl设备方法 执行make后显示 error: implicit declaration of function'kmalloc' error: implicit declaration of function'kfree' 经查到是缺少头文件#include 然后再make后显示:错误:初始值设定项里有未知的字段‘ioctl’ 这个错误原来是新的内核里面已经删除了ioctl函

sangzhihui608的博客 4390

微调实操一: 增量预训练(Pretraining)

《微调入门篇:大模型微调的理论学习》我们对大模型微调理论有了基本了解,这篇结合我们现实中常见的场景,进行大模型微调实操部分的了解和学习,之前我有写过类似的文章《实践篇:大模型微调增量预训练实践(二)》利用的MedicalGPT的源码在colab进行操作, 由于MedicalGPT代码比较难以理解,而且模型只能从hugging face上下载,对于一些国内服务器无法访问,我重构了代码,让训练代码更有可读性,并参考LLAMAFactory的项目,增加了modelscope上下载模型,轻松在国内服务器运行.

youbingchen的博客 6992

linux驱动ioctl函数,Linux驱动调试中关于ioctl的问题

1、提示:错误: 初始值设定项里有未知的字段‘ioctl’2.6以后的内核中file_operation结构体已经删除了ioctl函数,取代的是:long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);long (*compat_ioctl) (struct file *, unsigned int, unsigned...

weixin_35079944的博客 503

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Linux驱动调试中关于ioctl的问题

1、提示:错误: 初始值设定项里有未知的字段‘ioctl’ 2.6以后的内核中file_operation结构体已经删除了ioctl函数,取代的是:long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);long (*compat_ioctl) (struct file *, unsigned int, unsign...

weixin_33875564的博客 311

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

linux源码编译好还是编译好的,linux源码树编译

写linux的网卡驱动,需要把arm版本迁移至x86版本测试,这就需要重新编译适应x86 PC的源码树。其实安装的系统已经有源码树,不需要像arm版本那样重新编译,位于/lib/modules/3.0.0-14-generic/build下。 同时需要注意的是2.6.32版本和3.0.0-14内核在部分结构体上出现不兼容。直接编译会出现:错误: 初始值设定项里有未知的字段‘ioctl’这是因为3....

weixin_39737951的博客 148

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

编译linux源码,linux源码树编译

写linux的网卡驱动,需要把arm版本迁移至x86版本测试,这就需要重新编译适应x86 PC的源码树。其实安装的系统已经有源码树,不需要像arm版本那样重新编译,位于/lib/modules/3.0.0-14-generic/build下。 同时需要注意的是2.6.32版本和3.0.0-14内核在部分结构体上出现不兼容。直接编译会出现:错误: 初始值设定项里有未知的字段‘ioctl’这是因为3....

weixin_35902481的博客 149
上一篇: 错误: 隐式声明函数‘kmalloc’ [-Werror=implicit-function-declaration]
下一篇: memdev.ko --- 字符设备驱动程序
lamdoc
博客等级 码龄18年 155粉丝 655原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值