Skip to content

Added missing include required by recent versions of asm/uaccess.h#642

Closed
neilwhelchel wants to merge 1 commit intoLinuxCNC:masterfrom
neilwhelchel:compile-fixes
Closed

Added missing include required by recent versions of asm/uaccess.h#642
neilwhelchel wants to merge 1 commit intoLinuxCNC:masterfrom
neilwhelchel:compile-fixes

Conversation

@neilwhelchel
Copy link
Copy Markdown

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.

@andypugh
Copy link
Copy Markdown
Collaborator

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 0dbbfb3

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

@andypugh
Copy link
Copy Markdown
Collaborator

andypugh commented Sep 21, 2019

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 5ffa41e
But please don't let this dissuade you from further pull requests.

@andypugh andypugh closed this Sep 21, 2019
@neilwhelchel neilwhelchel deleted the compile-fixes branch September 24, 2019 07:50
@neilwhelchel
Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants