diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c index 4ae638eea5c..f6938f979df 100644 --- a/Modules/_multiprocessing/multiprocessing.c +++ b/Modules/_multiprocessing/multiprocessing.c @@ -128,7 +128,7 @@ static PyMethodDef module_methods[] = { {"recv", multiprocessing_recv, METH_VARARGS, ""}, {"send", multiprocessing_send, METH_VARARGS, ""}, #endif -#ifndef POSIX_SEMAPHORES_NOT_ENABLED +#if defined(HAVE_SEM_UNLINK) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) && !defined(__ANDROID__) {"sem_unlink", _PyMp_sem_unlink, METH_VARARGS, ""}, #endif {NULL}