diff --git a/lib_fiber/c/Makefile b/lib_fiber/c/Makefile index ba3815b80..e190fa599 100644 --- a/lib_fiber/c/Makefile +++ b/lib_fiber/c/Makefile @@ -117,7 +117,10 @@ endif ifeq ($(findstring Linux, $(UNIXNAME)), Linux) UNIXTYPE = LINUX CFLAGS += -DSHARE_STACK - CFLAGS += -DHAS_IO_URING + has_io_uring=$(HAS_IO_URING) + ifeq ($(has_io_uring), yes) + CFLAGS += -DHAS_IO_URING + endif endif # For CYGWIN diff --git a/lib_fiber/samples/client2/Makefile b/lib_fiber/samples/client2/Makefile index 3209bff21..0d4d2a312 100644 --- a/lib_fiber/samples/client2/Makefile +++ b/lib_fiber/samples/client2/Makefile @@ -1,5 +1,8 @@ include ../Makefile.in ifeq ($(findstring Linux, $(UNIXNAME)), Linux) - SYSLIB += -luring + has_io_uring=$(HAS_IO_URING) + ifeq ($(has_io_uring), yes) + SYSLIB += -luring + endif endif PROG = client diff --git a/lib_fiber/samples/file/Makefile b/lib_fiber/samples/file/Makefile index f0213c919..df9857c41 100644 --- a/lib_fiber/samples/file/Makefile +++ b/lib_fiber/samples/file/Makefile @@ -1,5 +1,8 @@ include ../Makefile.in ifeq ($(findstring Linux, $(UNIXNAME)), Linux) - SYSLIB += -luring + has_io_uring=$(HAS_IO_URING) + ifeq ($(has_io_uring), yes) + SYSLIB += -luring + endif endif PROG = file diff --git a/lib_fiber/samples/server2/Makefile b/lib_fiber/samples/server2/Makefile index 20b30d49a..b271932a9 100644 --- a/lib_fiber/samples/server2/Makefile +++ b/lib_fiber/samples/server2/Makefile @@ -1,5 +1,8 @@ include ../Makefile.in ifeq ($(findstring Linux, $(UNIXNAME)), Linux) - SYSLIB += -luring + has_io_uring=${HAS_IO_URING) + ifeq ($(has_io_uring), yes) + SYSLIB += -luring + endif endif PROG = server