summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_config_compat.pl
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts/make_config_compat.pl')
-rwxr-xr-x[-rw-r--r--]v4l/scripts/make_config_compat.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 21dce0126..785f9ff72 100644..100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -26,6 +26,25 @@ sub check_spin_lock()
close INNET;
}
+sub check_snd_pcm_rate_to_rate_bit()
+{
+ my $file = "$kdir/include/sound/pcm.h";
+ my $old_syntax = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/snd_pcm_rate_to_rate_bit/) {
+ $old_syntax = 0;
+ last;
+ }
+ }
+
+ if ($old_syntax) {
+ $out.= "\n#define COMPAT_PCM_TO_RATE_BIT 1\n";
+ }
+ close INNET;
+}
+
sub check_snd_ctl_boolean_mono_info()
{
my $file = "$kdir/include/sound/control.h";
@@ -49,6 +68,7 @@ sub check_other_dependencies()
{
check_spin_lock();
check_snd_ctl_boolean_mono_info();
+ check_snd_pcm_rate_to_rate_bit();
}
# Do the basic rules