Skip to content

Instantly share code, notes, and snippets.

@ftnk
Created June 7, 2015 06:04
Show Gist options
  • Save ftnk/119dd6363a560bf72e6e to your computer and use it in GitHub Desktop.
Save ftnk/119dd6363a560bf72e6e to your computer and use it in GitHub Desktop.
streem を Solaris でビルドした際の diff
$ git diff
diff --git a/src/Makefile b/src/Makefile
index 1d03c78..5f822bf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,6 +12,11 @@ TARGET:=$(TARGET).exe
LIBS += -lws2_32
endif
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),SunOS)
+LIBS = -lpthread -lbgc -lsocket
+endif
+
TESTS=$(wildcard $(TOP)/examples/*.strm)
SRCS=$(filter-out y.tab.c lex.yy.c, $(wildcard *.c))
diff --git a/src/string.c b/src/string.c
index 0ffb089..c2822f5 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2,7 +2,7 @@
#include "khash.h"
#include <pthread.h>
-#if defined(NO_READONLY_DATA_CHECK) || defined(_WIN32)
+#if defined(NO_READONLY_DATA_CHECK) || defined(_WIN32) || defined(sun)
static inline int
readonly_data_p(const char *s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment