Adds openbsd support
Seems to work on openbsd 6.3-current but needs more testing. Had to hardcode the binary path as openbsd considers getting the executable path at runtime a security flaw.
This commit is contained in:
parent
7591924f85
commit
2789857f32
|
@ -53,6 +53,10 @@ else ifeq ($(os),FreeBSD)
|
|||
LDFLAGS += -L/usr/local/lib
|
||||
else ifeq ($(os),Haiku)
|
||||
LIBS += -lncursesw -lnetwork -lbe
|
||||
else ifeq ($(os),OpenBSD)
|
||||
LIBS += -lncursesw
|
||||
CPPFLAGS += -I/usr/local/include
|
||||
LDFLAGS += -L/usr/local/lib
|
||||
else ifneq (,$(findstring CYGWIN,$(os)))
|
||||
CPPFLAGS += -D_XOPEN_SOURCE=700
|
||||
LIBS += -lncursesw -ldbghelp
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
#if defined(__FreeBSD__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
|
@ -572,6 +575,8 @@ String get_kak_binary_path()
|
|||
kak_assert(res != -1);
|
||||
buffer[res] = '\0';
|
||||
return buffer;
|
||||
#elif defined(__OpenBSD__)
|
||||
return "/usr/local/bin/";
|
||||
#else
|
||||
# error "finding executable path is not implemented on this platform"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user