diff --git a/ext/Makefile.ext.in b/ext/Makefile.ext.in index 0fd21c5..9b1a505 100644 --- a/ext/Makefile.ext.in +++ b/ext/Makefile.ext.in @@ -19,7 +19,7 @@ DESTDIR = CC = @CC@ AR = @AR@ LOCAL_LFLAGS = @LOCAL_LIB@ -LIBS = $(XLIBS) @LIBS@ +LIBS = $(XLIBS) @LIBS@ -lpthread CFLAGS = @CFLAGS@ @SHLIB_SO_CFLAGS@ $(XCFLAGS) CPPFLAGS = @CPPFLAGS@ $(XCPPFLAGS) LDFLAGS = $(LOCAL_LFLAGS) $(XLDFLAGS) @SHLIB_SO_LDFLAGS@ diff --git a/ext/net/gauche-net.h b/ext/net/gauche-net.h index 7377a36..e9b1a4d 100644 --- a/ext/net/gauche-net.h +++ b/ext/net/gauche-net.h @@ -94,7 +94,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. diff --git a/ext/net/net.c b/ext/net/net.c index 7b4ff02..7eeec2c 100644 --- a/ext/net/net.c +++ b/ext/net/net.c @@ -35,6 +35,10 @@ #include #include +#ifdef __OpenBSD__ +#include +#endif + /*================================================================== * Socket */