error: implicit declaration of function ‘create_proc_entry’
create_proc_entry
has been removed since 3.10 kernel version. Alternative is to use proc_create
. See that question for more info.
error: implicit declaration of function 'create_proc_read_entry' [-Werror=implicit-function-declaration]
The error is because you are not including explicitly the header that declares the function and the compiler is 'including' implicitily for you and this throws a warning. The flag '-Werror' is making the compiler treats the warning as an error. Try adding: #include <linux/proc_fs.h>
Also: create_proc_read_entry
is a deprecated function.
Take a look at: https://lkml.org/lkml/2013/4/11/215
Getting error: implicit declaration of function 'proc_create'
You also need to include <linux/proc_fs.h>
error: implicit declaration of function 'rdtscl' [-Werror=implicit-function-declaration] (but no error when running on older kernel version)
The website elixir.bootlin.com is pretty useful for these things. The following link is a search across the entire kernel sources tree for version 3.10.108 for the symbol rdtscl.
https://elixir.bootlin.com/linux/v3.10.108/ident/rdtscl
rdtscl is only defined as a macro, so looks like the macro is not defined where you are getting your error about implicit declaration of rdtscl.
The two places where rdtscl is defined as a macro are:
https://elixir.bootlin.com/linux/v3.10.108/source/arch/x86/include/asm/msr.h#L182
https://elixir.bootlin.com/linux/v3.10.108/source/arch/x86/include/asm/paravirt.h#L182
So the fix is to include the correct headers files if you are building for x86 (the headers defining those macros are in arch/x86), or replace the call to rdtscl with something else.
Creating proc entry under parent folder
Did you include the header file contain PDE declaration?
Related Topics
Stdin into Zip Command, How to Specify a File Name
Where to Put Svn Repository Directory in Linux
Application Counters in Linux? (And Osx)
Is Swarm Required for Using Multi-Host Networking Feature Using Overlay in Docker
Embedding an Application (In This Case a Terminal) Within a Qt Application
How to Assign Execute Permission to a .Sh File in Windows to Be Executed in Linux
Command Line Arguments to Docker Run
Getting Function Arguments Using Kprobes
How to Store Output from Printf with Formatting in a Variable
Find Which Program Caused a Core Dump File
How to Create a Multi Partition Sd Disk Image Without Root Privileges
On-The-Fly Output Redirection, Seeing The File Redirection Output While The Program Is Still Running
Convert Column to Matrix Format Using Awk
Why Use G++ Instead of Gcc to Compile *.Cc Files
Hidden File .Env Not Copied Using Docker Copy
Limit Top Command to Only Display Top X Processes on Command Line