Skip to content

Commit

Permalink
fix(bpf): fix missing definitions
Browse files Browse the repository at this point in the history
Signed-off-by: therealbobo <[email protected]>
  • Loading branch information
therealbobo committed May 17, 2024
1 parent 5fb4d11 commit d3a9e0d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions driver/bpf/fillers.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ or GPL2.txt for full copies of the license.
* structures. But the syscalls (might) still use them.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
#include <linux/time64.h>
struct compat_timespec {
int32_t tv_sec;
int32_t tv_nsec;
};

#include <linux/time32.h>
struct timespec {
int32_t tv_sec;
int32_t tv_nsec;
Expand All @@ -49,7 +44,13 @@ struct timeval {
int32_t tv_usec;
};
#else
#define timeval64 timeval
#if __has_include(<linux/time32.h>)
#include <linux/time32.h>
#else
#include <linux/compat.h>
#endif
#define timeval64 timeval
#define old_timespec32 compat_timespec
#endif

#define FILLER_RAW(x) \
Expand Down

0 comments on commit d3a9e0d

Please sign in to comment.