Skip to content

Instantly share code, notes, and snippets.

@shirok
Created February 14, 2013 18:30
Show Gist options
  • Save shirok/4955047 to your computer and use it in GitHub Desktop.
Save shirok/4955047 to your computer and use it in GitHub Desktop.
diff --git a/configure.ac b/configure.ac
index aa17d7c..d0f37ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,6 +199,12 @@ case $GAUCHE_THREAD_TYPE in
THREADDLLIBS="-lpthread -lrt"
GAUCHE_THREAD_TYPE=pthreads
;;
+ *-*-openbsd*)
+ AC_DEFINE(GC_OPENBSD_THREADS,1,[Define to use OpenBSD threads])
+ INCLUDES="$INCLUDES -pthread"
+ THREADLIBS="-lpthread"
+ GAUCHE_THREAD_TYPE=pthreads
+ ;;
*-*-solaris*)
AC_DEFINE(GC_SOLARIS_THREADS,1,[Define to use Solaris threads])
AC_DEFINE(GC_SOLARIS_PTHREADS,1,[Define to use Solaris pthreads])
diff --git a/ext/net/gauche-net.h b/ext/net/gauche-net.h
index 7377a36..40ab3d4 100644
--- a/ext/net/gauche-net.h
+++ b/ext/net/gauche-net.h
@@ -74,6 +74,10 @@ typedef SOCKET Socket;
#endif
#include <gauche/extern.h>
+#ifdef __OpenBSD__
+#include <sys/uio.h>
+#endif /*__OpenBSD__*/
+
SCM_DECL_BEGIN
/* windows stuff */
@@ -94,7 +98,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
* Sockaddr_storage
*/
-#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(_MSC_VER)
+#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(_MSC_VER) && !defined(__OpenBSD__)
/* Alternative implementation in case the system doesn't provide
sockaddr_storage. The code is based on the reference implementation
provided in RFC3493.
@shirok
Copy link
Author

shirok commented Feb 16, 2013

ふーむ、本家(boehm gc)にも一応報告上がっているようだけどまだ根本的な対応はされていないみたいですね。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment