diff --git a/adb/fdevent/fdevent.h b/adb/fdevent/fdevent.h index 9fc3b2c0c..bb3af746f 100644 --- a/adb/fdevent/fdevent.h +++ b/adb/fdevent/fdevent.h @@ -79,8 +79,8 @@ struct fdevent_context { unique_fd Destroy(fdevent* fde); protected: - virtual void Register(fdevent*) {} - virtual void Unregister(fdevent*) {} + virtual void Register(fdevent*) = 0; + virtual void Unregister(fdevent*) = 0; public: // Change which events should cause notifications. diff --git a/adb/fdevent/fdevent_poll.cpp b/adb/fdevent/fdevent_poll.cpp index ac86c08e1..21c1ba093 100644 --- a/adb/fdevent/fdevent_poll.cpp +++ b/adb/fdevent/fdevent_poll.cpp @@ -211,3 +211,7 @@ void fdevent_context_poll::Interrupt() { PLOG(FATAL) << "failed to write to fdevent interrupt fd"; } } + +void fdevent_context_poll::Register(fdevent*) {} + +void fdevent_context_poll::Unregister(fdevent*) {} diff --git a/adb/fdevent/fdevent_poll.h b/adb/fdevent/fdevent_poll.h index 98abab283..8803e3ec9 100644 --- a/adb/fdevent/fdevent_poll.h +++ b/adb/fdevent/fdevent_poll.h @@ -48,6 +48,9 @@ struct fdevent_context_poll final : public fdevent_context { fdevent_context_poll(); virtual ~fdevent_context_poll(); + virtual void Register(fdevent* fde) final; + virtual void Unregister(fdevent* fde) final; + virtual void Set(fdevent* fde, unsigned events) final; virtual void Loop() final;