summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/header.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build/header.pm')
-rw-r--r--source4/build/smb_build/header.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm
index 34e81a3a24..b0dced4897 100644
--- a/source4/build/smb_build/header.pm
+++ b/source4/build/smb_build/header.pm
@@ -39,16 +39,18 @@ sub _prepare_build_h($)
$name =~ s/-/_/g;
$DEFINE->{COMMENT} = "$key->{TYPE} $key->{NAME} INIT";
$DEFINE->{KEY} = "STATIC_$name\_MODULES";
- $DEFINE->{VAL} = "{ \\\n";
+ $DEFINE->{VAL} = "\\\n";
foreach (@{$key->{INIT_FUNCTIONS}}) {
$DEFINE->{VAL} .= "\t$_, \\\n";
- my $fn = $key->{INIT_FUNCTION_TYPE};
- unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; }
- $fn =~ s/\(\*\)/$_/;
- $output .= "$fn;\n";
+ unless (/{/) {
+ my $fn = $key->{INIT_FUNCTION_TYPE};
+ unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; }
+ $fn =~ s/\(\*\)/$_/;
+ $output .= "$fn;\n";
+ }
}
- $DEFINE->{VAL} .= "\tNULL \\\n }";
+ $DEFINE->{VAL} =~ s/, \\\n$//g; # Remove the last comma
push(@defines,$DEFINE);
}