Patch origin: in-house
Patch status: Solaris-specific; not suitable for upstream
For Apache 2.2 distinguishes 32bit and 64bit modules.
For Apache 2.4 removes all MPMs modules except event MPM.
@@ -20,6 +20,7 @@
use strict;
use warnings FATAL => 'all';
+use Cwd;
use Apache::TestTrace;
@@ -185,7 +186,7 @@
# - mod_fcgid causes https://rt.cpan.org/Public/Bug/Display.html?id=54476
# - mod_modnss.c and mod_rev.c require further configuration
# add modules to be not inherited from the existing config.
# e.g. prevent from LoadModule perl_module to be included twice, when
@@ -212,10 +213,26 @@
#inherit LoadModule
sub inherit_load_module {
my($self, $c, $directive) = @_;
+ my $httpd64bit = 0;
+ my $cwd = getcwd();
+ if (index($cwd, "amd64") != -1 or index($cwd, "sparcv9") != -1) {
+ $httpd64bit = 1;
+ }
for my $args (@{ $c->{$directive} }) {
my $modname = $args->[0];
my $file = $self->server_file_rel2abs($args->[1]);
+ if ($httpd64bit == 0) {
+ unless ($file !~ m/\/64\//) {
+ debug "$file is 64 bit module (we don't want it)";
+ next;
+ }
+ } else {
+ unless ($file =~ m/\/64\// || $file =~ m/\/2\.4\//) {
+ debug "$file is 32 bit module (we don't want it)";
+ next;
+ }
+ }
unless (-e $file) {
debug "$file does not exist, skipping LoadModule";