Skip to content

Commit

Permalink
[build] Only enable eBPF support on Linux kernel version 4.18 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
pajama-coder committed Dec 25, 2023
1 parent 420a772 commit 3f6940f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ if(PIPY_SAMPLES)
endif()

if(PIPY_BPF)
add_definitions(-DPIPY_USE_BPF)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 4.18)
add_definitions(-DPIPY_USE_BPF)
message("eBPF is enabled")
endif()
endif()
endif()

if(PIPY_SOIL_FREED_SPACE)
Expand Down
2 changes: 1 addition & 1 deletion src/pjs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ add_executable(pjs
main.cpp
parser.cpp
types.cpp
)
)

0 comments on commit 3f6940f

Please sign in to comment.