mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Remove duplicate symbols and add test case
When the event symbols were added to the public API, not all of them were removed from the private exports list. Solaris gets unhappy when there are duplicated symbols. Extend the symfile check to test for this scenario
This commit is contained in:
parent
9278578069
commit
f299ddd6b1
@ -5,9 +5,11 @@ die "syntax: $0 SYMFILE ELFLIB(S)" unless int(@ARGV) >= 2;
|
||||
my $symfile = shift @ARGV;
|
||||
my @elflibs = @ARGV;
|
||||
|
||||
my @wantsyms;
|
||||
my %wantsyms;
|
||||
my %gotsyms;
|
||||
|
||||
my $ret = 0;
|
||||
|
||||
open SYMFILE, $symfile or die "cannot read $symfile: $!";
|
||||
|
||||
while (<SYMFILE>) {
|
||||
@ -21,7 +23,12 @@ while (<SYMFILE>) {
|
||||
|
||||
die "malformed line $_" unless /^\s*(\S+);$/;
|
||||
|
||||
push @wantsyms, $1;
|
||||
if (exists $wantsyms{$1}) {
|
||||
print STDERR "Symbol $1 is listed twice\n";
|
||||
$ret = 1;
|
||||
} else {
|
||||
$wantsyms{$1} = 1;
|
||||
}
|
||||
}
|
||||
close SYMFILE;
|
||||
|
||||
@ -37,8 +44,6 @@ foreach my $elflib (@elflibs) {
|
||||
close NM;
|
||||
}
|
||||
|
||||
my $ret = 0;
|
||||
|
||||
foreach my $sym (@wantsyms) {
|
||||
next if exists $gotsyms{$sym};
|
||||
|
||||
|
@ -1178,8 +1178,6 @@ virDirCreate;
|
||||
virDoubleToStr;
|
||||
virEnumFromString;
|
||||
virEnumToString;
|
||||
virEventAddHandle;
|
||||
virEventRemoveHandle;
|
||||
virFileAbsPath;
|
||||
virFileAccessibleAs;
|
||||
virFileBuildPath;
|
||||
|
Loading…
Reference in New Issue
Block a user