util/mkdef.pl: prepare for DEPRECATEDIN_X
[openssl.git] / util / mkdef.pl
index b40fd2654f7d120b35e6cdd90f98c399d39240a2..9cb1147d289871653573301954fc2f4e8040e3c2 100755 (executable)
@@ -193,8 +193,8 @@ sub feature_filter {
 
     if ($apiv) {
         foreach (@features) {
-            next unless /^DEPRECATEDIN_(\d+)_(\d+)_(\d+)$/;
-            my $symdep = sprintf "%x%02x%02x", $1, $2, $3;
+            next unless /^DEPRECATEDIN_(\d+)(?:_(\d+)_(\d+))?$/;
+            my $symdep = sprintf "%x%02x%02x", $1, ($2 // 0), ($3 // 0);
             $verdict = 0 if $apiv ge $symdep;
         }
     }