Skip to content

Set the FreeBSD clock types #879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/event/event_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@

// FreeBSD's kevent does not support those
# ifndef NOTE_ABSOLUTE
# define NOTE_ABSOLUTE 0
# ifdef NOTE_ABSTIME
# define NOTE_ABSOLUTE NOTE_ABSTIME
# else
# define NOTE_ABSOLUTE 0
# endif
# endif
# ifndef NOTE_EXITSTATUS
# define NOTE_EXITSTATUS 0
Expand Down
4 changes: 4 additions & 0 deletions src/event/event_kevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ DISPATCH_STATIC_GLOBAL(struct dispatch_muxnote_bucket_s _dispatch_sources[DSL_HA
#define DISPATCH_NOTE_CLOCK_WALL NOTE_NSECONDS | NOTE_MACH_CONTINUOUS_TIME
#define DISPATCH_NOTE_CLOCK_MONOTONIC NOTE_MACHTIME | NOTE_MACH_CONTINUOUS_TIME
#define DISPATCH_NOTE_CLOCK_UPTIME NOTE_MACHTIME
#elif __FreeBSD__
#define DISPATCH_NOTE_CLOCK_WALL NOTE_NSECONDS
#define DISPATCH_NOTE_CLOCK_MONOTONIC NOTE_NSECONDS
#define DISPATCH_NOTE_CLOCK_UPTIME NOTE_NSECONDS
#else
#define DISPATCH_NOTE_CLOCK_WALL 0
#define DISPATCH_NOTE_CLOCK_MONOTONIC 0
Expand Down