summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_config_compat.pl
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-09-28 10:55:54 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-09-28 10:55:54 -0300
commit83fb6c87a9c82a47fd57ffaed422eba87114dbb1 (patch)
tree7b72d80091980b54d7c1aee8ff49d0bc4a56caf7 /v4l/scripts/make_config_compat.pl
parent7ffda86bc612f5670c3461d8342ccb24d2ebc547 (diff)
downloadmediapointer-dvb-s2-83fb6c87a9c82a47fd57ffaed422eba87114dbb1.tar.gz
mediapointer-dvb-s2-83fb6c87a9c82a47fd57ffaed422eba87114dbb1.tar.bz2
compat: allow compililation with kernels with updated sound drivers
From: Mauro Carvalho Chehab <mchehab@infradead.org> A few distro kernels, like Mandriva 2.6.22.9-desktop-1mdv are starting to be shipped with the newer alsa drivers. This patch changes the compat code for older kernels in a way that it will be compatible also with those distro kernels. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/make_config_compat.pl')
-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 be577d247..21dce0126 100644
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -26,9 +26,29 @@ sub check_spin_lock()
close INNET;
}
+sub check_snd_ctl_boolean_mono_info()
+{
+ my $file = "$kdir/include/sound/control.h";
+ my $old_syntax = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/snd_ctl_boolean_mono_info/) {
+ $old_syntax = 0;
+ last;
+ }
+ }
+
+ if ($old_syntax) {
+ $out.= "\n#define COMPAT_SND_CTL_BOOLEAN_MONO 1\n";
+ }
+ close INNET;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
+ check_snd_ctl_boolean_mono_info();
}
# Do the basic rules