This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure: Improve the d_prctl_set_name detection for Android
authorBrian Fraser <fraserbn@gmail.com>
Wed, 20 Aug 2014 17:19:13 +0000 (19:19 +0200)
committerBrian Fraser <fraserbn@gmail.com>
Wed, 20 Aug 2014 18:27:19 +0000 (20:27 +0200)
On some versions of Android (e.g., 4.2.2, API level 17)
the header that defines the constants used for this test
will not work if unistd.h isn't already included.

Configure

index a67a2c9..23b47df 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -16541,6 +16541,9 @@ d_prctl_set_name=$undef
 case $d_prctl in
     $define)
        $cat >try.c <<EOM
+#ifdef __ANDROID__
+#include <unistd.h>
+#endif
 #include <sys/prctl.h>
 
 int main (int argc, char *argv[])