diff --git a/src/c_wrapper/event.cpp b/src/c_wrapper/event.cpp
index 316b08108c69f388d753a777472f37a6c7cd3a45..d75c3a324030f5bee50f2067f03e3c7dd40d6e9e 100644
--- a/src/c_wrapper/event.cpp
+++ b/src/c_wrapper/event.cpp
@@ -221,11 +221,11 @@ event__wait(clobj_t evt)
         });
 }
 
-#if PYOPENCL_CL_VERSION >= 0x1010 && defined(PYOPENCL_HAVE_EVENT_SET_CALLBACK)
 
 error*
 event__set_callback(clobj_t _evt, cl_int type, void *pyobj)
 {
+#if PYOPENCL_CL_VERSION >= 0x1010 && defined(PYOPENCL_HAVE_EVENT_SET_CALLBACK)
     auto evt = static_cast<event*>(_evt);
     return c_handle_error([&] {
             pyobj = py::ref(pyobj);
@@ -238,8 +238,10 @@ event__set_callback(clobj_t _evt, cl_int type, void *pyobj)
                 py::deref(pyobj);
             }
         });
-}
+#else
+    PYOPENCL_UNSUPPORTED(clSetEventCallback, "CL 1.0 and below and Windows")
 #endif
+}
 
 // Nanny Event
 void*
diff --git a/test/test_wrapper.py b/test/test_wrapper.py
index 063071bafea6d69ca9a23f5ee10bc1f8e2320c5b..e7f86c2e5eddfeeb07de1b17d9f78797c1da2dba 100644
--- a/test/test_wrapper.py
+++ b/test/test_wrapper.py
@@ -792,6 +792,10 @@ def test_program_valued_get_info(ctx_factory):
 
 
 def test_event_set_callback(ctx_factory):
+    import sys
+    if sys.platform.startswith("win"):
+        pytest.xfail("Event.set_callback not present on Windows")
+
     ctx = ctx_factory()
     queue = cl.CommandQueue(ctx)