diff --git a/src/Makefile b/src/Makefile index f3b32238..ef30d3ad 100644 --- a/src/Makefile +++ b/src/Makefile @@ -30,6 +30,10 @@ ifeq ($(os),Darwin) LIBS += -lncurses -lboost_regex-mt else ifeq ($(os),Haiku) LIBS += -lncursesw -lboost_regex -lnetwork -lbe +else ifeq ($(os),DragonFly) + LIBS += -lncursesw -lboost_regex + CPPFLAGS += -I/usr/local/include + LDFLAGS += -L/usr/local/lib else ifneq (,$(findstring CYGWIN,$(os))) LIBS += -lncursesw -lboost_regex -ldbghelp else diff --git a/src/file.cc b/src/file.cc index ef150a19..3c51c002 100644 --- a/src/file.cc +++ b/src/file.cc @@ -505,6 +505,11 @@ String get_kak_binary_path() kak_assert(status == B_OK); BPath path(&info.ref); return path.Path(); +#elif defined(__DragonFly__) + ssize_t res = readlink("/proc/curproc/file", buffer, 2048); + kak_assert(res != -1); + buffer[res] = '\0'; + return buffer; #else # error "finding executable path is not implemented on this platform" #endif