diff options
author | Richard Ipsum <richardipsum@fastmail.co.uk> | 2019-03-17 21:33:03 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-03-21 20:24:37 +0000 |
commit | 33d6ea6d65d97d2eb5a962b4b7ead21ea0176110 (patch) | |
tree | b26d72315bdd093d98db23a051d754285e441975 | |
parent | 80bbeba5ca28d9901fa1b66ae4cb08ba58018bb8 (diff) | |
download | luxio-33d6ea6d65d97d2eb5a962b4b7ead21ea0176110.tar.gz |
Enable compilation on OpenBSD
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | findlua.mk | 8 | ||||
-rw-r--r-- | luxio.c | 4 |
3 files changed, 12 insertions, 4 deletions
@@ -78,7 +78,7 @@ luxio-5.2: lua-5.2.c luxio-5.2.o ### luxio-5.1.o: luxio.c luxio_constants.inc - $(CC) $(CFLAGS) -fPIC $(LUA51_INC) -c $< -o $@ + $(CC) $(CFLAGS) -fPIC $(EXTRA_INC) $(LUA51_INC) -c $< -o $@ luxio-5.2.o: luxio.c luxio_constants.inc - $(CC) $(CFLAGS) -fPIC $(LUA52_INC) -c $< -o $@ + $(CC) $(CFLAGS) -fPIC $(EXTRA_INC) $(LUA52_INC) -c $< -o $@ @@ -17,6 +17,14 @@ else EXTRA_LIBS := endif +ifeq ($(HOST_OS),OpenBSD) + # Linux and FreeBSD have a 'builtin' iconv + EXTRA_LIBS := $(EXTRA_LIBS) -L /usr/local/lib -liconv + EXTRA_INC := -I /usr/local/include +else + EXTRA_INC := +endif + NAKED_LUA_VER := $(shell (pkg-config --exists lua && \ pkg-config --modversion lua || \ pkg-config --variable V lua) | cut -d. -f1-2) @@ -2550,7 +2550,7 @@ luxio_nanosleep(lua_State *L) /* 14.2.5 */ POSIX message passing is not available on all platforms. @section msgpass */ -#if defined(_POSIX_MESSAGE_PASSING) +#if _POSIX_MESSAGE_PASSING >= 0 #include <mqueue.h> @@ -4592,7 +4592,7 @@ luxio_functions[] = { { "nanosleep", luxio_nanosleep }, -#if defined(_POSIX_MESSAGE_PASSING) +#if _POSIX_MESSAGE_PASSING >= 0 #if _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L { "mq_timedsend", luxio_mq_timedsend }, |