mncoppola / suterusu

An LKM rootkit targeting Linux 2.6/3.x on x86(_64), and ARM
MIT License
635 stars 210 forks source link

Fix conflicting types for ia32_sys_call_table and sys_call_table error #11

Open kkamagui opened 6 years ago

kkamagui commented 6 years ago

If the host uses gcc 6 compiler, the compiler shows error as follows.

/home/user/suterusu/common.h:44:23: error: conflicting types for ‘sys_call_table’ extern unsigned long *sys_call_table; ^~~~~~ In file included from /usr/src/linux-headers-4.9.0-3-common/arch/x86/include/asm/elf.h:12:0, from /usr/src/linux-headers-4.9.0-3-common/include/linux/elf.h:4, from /usr/src/linux-headers-4.9.0-3-common/include/linux/module.h:15, from /home/user/suterusu/common.h:1, from /home/user/suterusu/main.c:1: /usr/src/linux-headers-4.9.0-3-common/arch/x86/include/asm/syscall.h:26:29: note: previous declaration of ‘sys_call_table’ was here extern const sys_call_ptr_t sys_call_table[]; ^~~~~~

To fix this error, I change names of the variables. Signed-off-by: Seunghun Han kkamagui@gmail.com

jacksgt commented 6 years ago

Thanks for this patch, works for me! :-)