Index: scheduler/main.c =================================================================== --- scheduler/main.c (revision 10632) +++ scheduler/main.c (working copy) @@ -65,11 +65,16 @@ #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) # include #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ + #ifdef HAVE_NOTIFY_H # include #endif /* HAVE_NOTIFY_H */ +#ifdef HAVE_SYS_PARAM_H +# include +#endif /* HAVE_SYS_PARAM_H */ + /* * Local functions... */ @@ -361,15 +366,15 @@ } } -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) && OpenBSD < 201211 /* * Call _thread_sys_closefrom() so the child process doesn't reset the * parent's file descriptors to be blocking. This is a workaround for a - * limitation of userland libpthread on OpenBSD. + * limitation of userland libpthread on older versions of OpenBSD. */ _thread_sys_closefrom(0); -#endif /* __OpenBSD__ */ +#endif /* __OpenBSD__ && OpenBSD < 201211 */ /* * Since CoreFoundation and DBUS both create fork-unsafe data on execution of