diff --git a/Makefile b/Makefile index 3d1af75..2eb9a50 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,14 @@ all: $(LIB) $(OBJS): coio.h coro.h -.o: .c +.c.o: $(CC) $(CFLAGS) -W -Wall -Wextra -Werror -c $*.c $(LIB): $(OBJS) $(AR) rvc $(LIB) $? testyield: testyield.c $(LIB) - $(CC) $(CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -o $@ testyield.c $(LIB) test: testyield @@ -25,3 +25,4 @@ clean: rm -f testyield .PHONY: all clean test +.SUFFIXES: .c .o diff --git a/coio.c b/coio.c index 819dd14..b50bad3 100644 --- a/coio.c +++ b/coio.c @@ -6,7 +6,7 @@ static coro_context _sched_ctx; static unsigned long _taskcount = 0; -CoioTaskList coio_ready = {0}; +CoioTaskList coio_ready = {0, 0}; CoioTask *coio_current; int diff --git a/coro.h b/coro.h index 13cc1aa..9f07c2d 100644 --- a/coro.h +++ b/coro.h @@ -303,7 +303,7 @@ void coro_stack_free (struct coro_stack *stack); # define CORO_ASM 1 # elif defined WINDOWS || defined _WIN32 # define CORO_LOSER 1 /* you don't win with windoze */ -# elif __linux && (__i386 || (__x86_64 && !__ILP32)) +# elif (__linux || __OpenBSD__) && (__i386 || (__x86_64 && !__ILP32)) # define CORO_ASM 1 # elif defined HAVE_UCONTEXT_H # define CORO_UCONTEXT 1