summaryrefslogtreecommitdiff
path: root/include/my_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_context.h')
-rw-r--r--include/my_context.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/my_context.h b/include/my_context.h
index 1e1b7e6a749..8ed0c0ccf4e 100644
--- a/include/my_context.h
+++ b/include/my_context.h
@@ -31,8 +31,10 @@
#define MY_CONTEXT_USE_X86_64_GCC_ASM
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
#define MY_CONTEXT_USE_I386_GCC_ASM
-#else
+#elif defined(HAVE_UCONTEXT)
#define MY_CONTEXT_USE_UCONTEXT
+#else
+#define MY_CONTEXT_DISABLE
#endif
#ifdef MY_CONTEXT_USE_WIN32_FIBERS
@@ -104,6 +106,13 @@ struct my_context {
#endif
+#ifdef MY_CONTEXT_DISABLE
+struct my_context {
+ int dummy;
+};
+#endif
+
+
/*
Initialize an asynchroneous context object.
Returns 0 on success, non-zero on failure.