From 09b7e8000e6135a4fe85194f4451b6ab3be32961 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Wed, 6 Sep 2023 00:15:23 +0200 Subject: [PATCH] make : enable BSD extensions for DragonFlyBSD to expose RLIMIT_MEMLOCK --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 1647ac4c6..82c4cadd6 100644 --- a/Makefile +++ b/Makefile @@ -111,10 +111,15 @@ endif # RLIMIT_MEMLOCK came in BSD, is not specified in POSIX.1, # and on macOS its availability depends on enabling Darwin extensions +# similarly on DragonFly, enabling BSD extensions is necessary ifeq ($(UNAME_S),Darwin) MK_CFLAGS += -D_DARWIN_C_SOURCE MK_CXXFLAGS += -D_DARWIN_C_SOURCE endif +ifeq ($(UNAME_S),DragonFly) + MK_CFLAGS += -D__BSD_VISIBLE + MK_CXXFLAGS += -D__BSD_VISIBLE +endif ifdef LLAMA_DEBUG MK_CFLAGS += -O0 -g