0

I am writing a C++ module for the Nexus 7 Android kernel. Previously I compiled this module successfully with the Goldfish kernel. But now after porting the necessary changes to the Nexus 7 kernel, I am getting a compilation error. The problem seems to be with the headers. Whenever i include the linux/fs.h or linux/debugfs.h in the module, it is giving the following error.

/linux/radix-tree.h: In function 'void* radix_tree_deref_slot(void**)': /android_kernel_grouper-android-tegra3-grouper-3.1-jb-fr2/include/linux/radix-tree.h:153:9: error: 'void*' is not a pointer-to-object type

The corresponding line in the radix-tree.h has something to do with rcu_dereference().

Is the problem with the headers, or the makefile or due to faulty patching?

user1505986
  • 257
  • 4
  • 10

1 Answers1

0

To find out the compilation parameters used in gcc (or g++), you should use "make V=1" against the makefile. but the error:

error: 'void*' is not a pointer-to-object type

looked more like a C++ error, which is inherent in your code (Android kernel does not use C++).

This seemed to be solvable by recasting:

Error: ‘void*’ is not a pointer-to-object type

C++. Error: void is not a pointer-to-object type

etc.

Community
  • 1
  • 1
Peter Teoh
  • 6,337
  • 4
  • 42
  • 58