summaryrefslogtreecommitdiff
path: root/dev-perl/Proc-ProcessTable/files/0.45-pthread.patch
blob: 537e2926c4d70c0b0867feda4357e902fa87496c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
https://rt.cpan.org/Public/Bug/Display.html?id=46861
--- Proc-ProcessTable-0.45/hints/linux.pl
+++ Proc-ProcessTable-0.45/hints/linux.pl
@@ -1 +1,11 @@
+# We might have a non-threading perl, which doesn't add this
+# necessary link option.
+use Config;
+my $thread_lib = "-lpthread";
+
+if( $Config{libs} !~ /$thread_lib/ ) {
+  $self->{LIBS} ||= [];
+  push @{ $self->{LIBS} }, $thread_lib;
+}
+
 symlink "os/Linux.c", "OS.c" || die "Could not link os/Linux.c to os/OS.c\n";