[LinuxCNC/linuxcnc PR#642] Added missing include required by recent versions of asm/uaccess.h

未分类 bolang 5个月前 (10-15) 29次浏览

Issue #642 | 状态: 已关闭 | 作者: neilwhelchel | 创建时间: 2019-09-04


This fixes a compile error with recent versions of the linux kernel, in my case 4.14.134:

./arch/x86/include/asm/uaccess.h:33:9: error: dereferencing pointer to incomplete type
current->thread.addr_limit = fs;

I have not tested this against older versions of the kernel, but it seems safe to include traps.h as it has an include guard.


评论 (3)

#1 – andypugh 于 2019-09-21

I did an experiment to see if another possible fix worked last night.
(I should have done it in an experimental branch, and really I think that a fix belongs in 2.8 or maybe even 2.7)
Based on https://lkml.org/lkml/2017/9/30/189 I put in 0dbbfb3ae106feea27dab4753ae40c21b6ea06d3

But I think I will roll that back and use kernel version macros. so that the change only happens post 2.14. Thoughts.


#2 – andypugh 于 2019-09-21

Thanks for bringing this to to our attention.
In the end I have decided to use the fix recommended here:
https://lkml.org/lkml/2017/9/30/189
via 5ffa41e504ab9138a1287560ded1749b2d5f7aa5
But please don’t let this dissuade you from further pull requests.


#3 – neilwhelchel 于 2019-09-24

Hello Andy, good catch! Strangely enough I knew about how the headers are being changed around in the kernel, but I totally missed that when made this fix. I guess I had a bad case of tunnel vision.


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/642

喜欢 (0)