Skip to content

Commit

Permalink
Add macros to detect RHEL kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
gnosek committed Aug 8, 2019
1 parent ce8281b commit 3c2704f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ set(DRIVER_SOURCES
syscall_table.c
ppm_cputime.c
ppm_compat_unistd_32.h
ppm_version.h
)

foreach(FILENAME IN LISTS DRIVER_SOURCES)
Expand Down
9 changes: 9 additions & 0 deletions driver/ppm_version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <linux/version.h>

#ifdef RHEL_RELEASE_CODE
#define PPM_RHEL_RELEASE_CODE RHEL_RELEASE_CODE
#define PPM_RHEL_RELEASE_VERSION(x,y) RHEL_RELEASE_VERSION(x,y)
#else
#define PPM_RHEL_RELEASE_CODE 0
#define PPM_RHEL_RELEASE_VERSION(x,y) 0
#endif

0 comments on commit 3c2704f

Please sign in to comment.