I modified some files in the Linux kernel
include/linux/tcp.h
include/net/tcp.h
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_output.c
Following this i compiled the modified Linux kernel
$ make modules_install
$ make headers_install INSTALL_HDR_PATH=/usr/include
$ make install
The new kernel can start, everything seems normal. But when i tried to include the modified kernel header in my app, the compiler complains that the header does NOT define the types which i have just added. Upon checking /usr/include/netinet/tcp.h, i find that it is NOT the file i modified.
Q. How can i properly export modified Linux kernel headers to include in a C program ?
A. Copy them to somewhere the code expects to find them, such as a directory you then pass to the compiler via -I, and then make sure that the code actually includes them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With