summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/mmapmodule.c6
-rw-r--r--Modules/socketmodule.c2
-rw-r--r--setup.py9
5 files changed, 18 insertions, 2 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index bd300de..7d4c1bf 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -492,6 +492,7 @@ James A Morrison
Sjoerd Mullender
Sape Mullender
Michael Muller
+Piotr Meyer
John Nagle
Takahiro Nakayama
Travers Naran
diff --git a/Misc/NEWS b/Misc/NEWS
index d78220e..a52e37a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -53,6 +53,8 @@ Core and Builtins
Library
-------
+- Issue #5400: Added patch for multiprocessing on netbsd compilation/support
+
- Issue #5387: Fixed mmap.move crash by integer overflow.
- Issue #5261: Patch multiprocessing's semaphore.c to support context
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index d903eca..c6c8a30 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -520,7 +520,11 @@ mmap_resize_method(mmap_object *self,
#ifdef MREMAP_MAYMOVE
newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE);
#else
- newmap = mremap(self->data, self->size, new_size, 0);
+ #if defined(__NetBSD__)
+ newmap = mremap(self->data, self->size, self->data, new_size, 0);
+ #else
+ newmap = mremap(self->data, self->size, new_size, 0);
+ #endif /* __NetBSD__ */
#endif
if (newmap == (void *)-1)
{
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 35809ee..c229c07 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -382,7 +382,7 @@ dup_socket(SOCKET handle)
#define SOCKETCLOSE close
#endif
-#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H)
+#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) && !defined(__NetBSD__)
#define USE_BLUETOOTH 1
#if defined(__FreeBSD__)
#define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP
diff --git a/setup.py b/setup.py
index 522eb82..3c25172 100644
--- a/setup.py
+++ b/setup.py
@@ -1023,6 +1023,15 @@ class PyBuildExt(build_ext):
)
libraries = []
+ elif platform.startswith('netbsd'):
+ macros = dict( # at least NetBSD 5
+ HAVE_SEM_OPEN=1,
+ HAVE_SEM_TIMEDWAIT=0,
+ HAVE_FD_TRANSFER=1,
+ HAVE_BROKEN_SEM_GETVALUE=1
+ )
+ libraries = []
+
else: # Linux and other unices
macros = dict(
HAVE_SEM_OPEN=1,