歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux內核 >> linux內核不支持struct vm_area_struct結構體中flag標志使用值問題

linux內核不支持struct vm_area_struct結構體中flag標志使用值問題

日期:2017/3/3 15:48:06   编辑:Linux內核

error: ‘VM_RESERVED’ undeclared (first use in this function

從linux 3.7.0開始內核不再支持struct vm_area_struct結構體中flag標志使用值 VM_RESERVED,驅動開發中把

vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED);  
改為  
vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP));

重新編譯內核即可。

本欄目更多精彩內容:http://www.bianceng.cn/OS/Linux/

Copyright © Linux教程網 All Rights Reserved