about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 3f1200b..6f563c1 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -104,6 +104,8 @@ push @writemakefile_args, (
 
 WriteMakefile(@writemakefile_args);
 
+my $tflags = $ccflags;
+$tflags .= ' -DHAS_SOCKADDR_SA_LEN ' if $Config{d_sockaddr_sa_len};
 sub MY::postamble {
         <<EOF;
 N = \$\$(( \$\$(nproc 2>/dev/null || gnproc 2>/dev/null || echo 2) + 1 ))
@@ -114,7 +116,7 @@ check-manifest :: MANIFEST
 
 build.env :: Makefile
         echo >\$\@+ extra_linker_flags=$LIBS -lpthread
-        echo >>\$\@+ extra_compiler_flags=-I. $INC $Config{ccflags} $ccflags
+        echo >>\$\@+ extra_compiler_flags=-I. $INC $Config{ccflags} $tflags
         mv \$\@+ \$\@
 
 pure_all :: build.env