diff --git a/Makefile b/Makefile index b5d9e7c..111b67f 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,11 @@ else HDR := $(filter-out athr_terminal_win32.h,$(SRC)) endif +ifeq ($(CURSES_FOUND),false) + SRC := $(filter-out athr_terminal_curses.c,$(SRC)) + HDR := $(filter-out athr_terminal_curses.h,$(SRC)) +endif + CFLAGS += -DATHR_TERMINAL_WIN32=$(ATHR_TERMINAL_WIN32) CFLAGS += -DATHR_TERMINAL_CURSES=$(ATHR_TERMINAL_CURSES) CFLAGS += -DATHR_TERMINAL_IOCTL=$(ATHR_TERMINAL_IOCTL) diff --git a/athr_terminal_ioctl.c b/athr_terminal_ioctl.c index 2922073..c5f8b97 100644 --- a/athr_terminal_ioctl.c +++ b/athr_terminal_ioctl.c @@ -1,3 +1,8 @@ +#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#endif + #include "athr_terminal_ioctl.h" #include "athr_logger.h" #include "athr_terminal.h"