Bug #5376
closedOpenBSD pthread_np.h present but cannot be compiled
Description
I run OpenBSD and use autoconf-2.64 to create the configure script. OpenBSD has pthread_np.h, but configure rejects it.
From config.log:
configure:16017: WARNING: pthread_np.h: present but cannot be compiled
configure:16017: WARNING: pthread_np.h: check for missing prerequisite headers?
configure:16017: WARNING: pthread_np.h: see the Autoconf documentation
configure:16017: WARNING: pthread_np.h: section "Present But Cannot Be Compiled"
configure:16017: WARNING: pthread_np.h: proceeding with the compiler's result
I called the script as ../configure --prefix=/home/kernigh/prefix --with-baseruby=/usr/local/bin/ruby19 CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
With OpenBSD, <pthread_np.h> requires to #include <pthread.h> first. Ruby already does so, but the configure check never does so. The fix is to change the configure check to #include <pthread.h> before #include <pthread_np.h>. Use attached patch.
Files