File: socket_h.patch

package info (click to toggle)
libnet-interface-perl 1.016-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,264 kB
  • sloc: ansic: 3,397; sh: 2,736; perl: 888; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: Architecture independent patch for CPAN bug #83994
Author: Christopher Hoskin <christopher.hoskin@gmail.com>
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=83994
Last-Update: 2016-09-23

--- a/inst/netsymbols.pl
+++ b/inst/netsymbols.pl
@@ -147,8 +147,20 @@
   return if $slurped{$in};
   $slurped{$in} = 1;
   local *F;
-  my $file = ($sw) ?
-	$in : $Config{usrinc} .'/'. $in;
+  my $file;
+  if ($sw) {
+      $file = $in;
+  } else {
+    my $incpth = $Config{incpth};
+    while ($incpth =~ /(\S+)/g) {
+      my $path=$1 .'/'. $in;
+      if (-e $path) {
+      $file=$path;
+        last;
+      }
+    }
+    return unless ($file);
+  }
   open (F,$file) or return;
   my @new = <F>;
   close F;