diff --git a/scheds/rust/scx_layered/src/bpf/main.bpf.c b/scheds/rust/scx_layered/src/bpf/main.bpf.c index c575c9af5..7c87b2477 100644 --- a/scheds/rust/scx_layered/src/bpf/main.bpf.c +++ b/scheds/rust/scx_layered/src/bpf/main.bpf.c @@ -1,9 +1,9 @@ /* Copyright (c) Meta Platforms, Inc. and affiliates. */ + #ifdef LSP #ifndef __bpf__ #define __bpf__ #endif -#define LSP_INC #include "../../../../include/scx/common.bpf.h" #include "../../../../include/scx/namespace_impl.bpf.h" #else diff --git a/scheds/rust/scx_layered/src/bpf/timer.bpf.c b/scheds/rust/scx_layered/src/bpf/timer.bpf.c index b8b5f51ba..1ccfe0a05 100644 --- a/scheds/rust/scx_layered/src/bpf/timer.bpf.c +++ b/scheds/rust/scx_layered/src/bpf/timer.bpf.c @@ -1,10 +1,9 @@ /* Copyright (c) Meta Platforms, Inc. and affiliates. */ #ifdef LSP +#ifndef __bpf__ #define __bpf__ #endif - -#if defined LSP && defined LSP_INC #include "../../../../include/scx/common.bpf.h" #else #include diff --git a/scheds/rust/scx_layered/src/bpf/timer.bpf.h b/scheds/rust/scx_layered/src/bpf/timer.bpf.h index 6827c0bf2..e6e40de1e 100644 --- a/scheds/rust/scx_layered/src/bpf/timer.bpf.h +++ b/scheds/rust/scx_layered/src/bpf/timer.bpf.h @@ -1,12 +1,16 @@ /* Copyright (c) Meta Platforms, Inc. and affiliates. */ #ifndef __LAYERED_TIMER_H #define __LAYERED_TIMER_H + #ifdef LSP +#ifndef __bpf__ #define __bpf__ -#ifndef LSP_INC -#include "../../../../include/scx/common.bpf.h" #endif +#include "../../../../include/scx/common.bpf.h" +#else +#include #endif + #include #include #include diff --git a/scheds/rust/scx_layered/src/bpf/util.bpf.c b/scheds/rust/scx_layered/src/bpf/util.bpf.c index 6c3f5e2c4..6d02f78d7 100644 --- a/scheds/rust/scx_layered/src/bpf/util.bpf.c +++ b/scheds/rust/scx_layered/src/bpf/util.bpf.c @@ -1,8 +1,8 @@ + #ifdef LSP #ifndef __bpf__ #define __bpf__ #endif -#define LSP_INC #include "../../../../include/scx/common.bpf.h" #else #include diff --git a/scheds/rust/scx_layered/src/bpf/util.bpf.h b/scheds/rust/scx_layered/src/bpf/util.bpf.h index 8446545b4..1316671e6 100644 --- a/scheds/rust/scx_layered/src/bpf/util.bpf.h +++ b/scheds/rust/scx_layered/src/bpf/util.bpf.h @@ -1,12 +1,16 @@ /* Copyright (c) Meta Platforms, Inc. and affiliates. */ #ifndef __LAYERED_UTIL_H #define __LAYERED_UTIL_H + #ifdef LSP +#ifndef __bpf__ #define __bpf__ -#ifndef LSP_INC -#include "../../../../include/scx/common.bpf.h" #endif +#include "../../../../include/scx/common.bpf.h" +#else +#include #endif + #include #include #include