diff --git a/selfpatch/CMakeLists.txt b/selfpatch/CMakeLists.txt index 4771ad7..3bfe872 100644 --- a/selfpatch/CMakeLists.txt +++ b/selfpatch/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(spslr_selfpatch STATIC src/selfpatch.cpp) +add_library(spslr_selfpatch STATIC src/selfpatch.c) target_include_directories(spslr_selfpatch PUBLIC $ diff --git a/selfpatch/include/spslr.h b/selfpatch/include/spslr.h new file mode 100644 index 0000000..22068b3 --- /dev/null +++ b/selfpatch/include/spslr.h @@ -0,0 +1,6 @@ +#ifndef SPSLR_SELFPATCH_H +#define SPSLR_SELFPATCH_H + +void spslr_selfpatch(); + +#endif diff --git a/selfpatch/src/selfpatch.c b/selfpatch/src/selfpatch.c new file mode 100644 index 0000000..9d50fa7 --- /dev/null +++ b/selfpatch/src/selfpatch.c @@ -0,0 +1,6 @@ +#include +#include + +void spslr_selfpatch() { + printf("SPSLR -> selfpatch()\n"); +} diff --git a/selfpatch/src/selfpatch.cpp b/selfpatch/src/selfpatch.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/subject/main.c b/subject/main.c index 737d062..260ce9c 100644 --- a/subject/main.c +++ b/subject/main.c @@ -1,3 +1,5 @@ +#include + #include "task_struct.h" int second_pid(); @@ -7,6 +9,8 @@ struct task_struct global = { .pid = 42, .comm = "main_global" }; int main(void) { + spslr_selfpatch(); + struct list_head task_list; INIT_LIST_HEAD(&task_list);