Changed selfpatch to be C
This commit is contained in:
parent
31d80c3783
commit
cd10fce382
@ -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
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
|
||||
6
selfpatch/include/spslr.h
Normal file
6
selfpatch/include/spslr.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef SPSLR_SELFPATCH_H
|
||||
#define SPSLR_SELFPATCH_H
|
||||
|
||||
void spslr_selfpatch();
|
||||
|
||||
#endif
|
||||
6
selfpatch/src/selfpatch.c
Normal file
6
selfpatch/src/selfpatch.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <spslr.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void spslr_selfpatch() {
|
||||
printf("SPSLR -> selfpatch()\n");
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
#include <spslr.h>
|
||||
|
||||
#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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user