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
|
LDFLAGS += -L/usr/local/lib
|
||||||
else ifeq ($(os),Haiku)
|
else ifeq ($(os),Haiku)
|
||||||
LIBS += -lncursesw -lnetwork -lbe
|
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)))
|
else ifneq (,$(findstring CYGWIN,$(os)))
|
||||||
CPPFLAGS += -D_XOPEN_SOURCE=700
|
CPPFLAGS += -D_XOPEN_SOURCE=700
|
||||||
LIBS += -lncursesw -ldbghelp
|
LIBS += -lncursesw -ldbghelp
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
|
@ -572,6 +575,8 @@ String get_kak_binary_path()
|
||||||
kak_assert(res != -1);
|
kak_assert(res != -1);
|
||||||
buffer[res] = '\0';
|
buffer[res] = '\0';
|
||||||
return buffer;
|
return buffer;
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
return "/usr/local/bin/";
|
||||||
#else
|
#else
|
||||||
# error "finding executable path is not implemented on this platform"
|
# error "finding executable path is not implemented on this platform"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user