summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-22 11:39:10 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-11-22 11:39:10 -0200
commit76b6f5c5b37d1795e744a8f0347f7e80fd1cd434 (patch)
treee4fd6be6be474a0a5732c5ae9aa82a52fa2cbaaf /v4l/scripts
parent88397975bb4eefaf1654cdb449ae02977262dae5 (diff)
downloadmediapointer-dvb-s2-76b6f5c5b37d1795e744a8f0347f7e80fd1cd434.tar.gz
mediapointer-dvb-s2-76b6f5c5b37d1795e744a8f0347f7e80fd1cd434.tar.bz2
Improve compatibility with RHEL kernels
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-xv4l/scripts/make_config_compat.pl60
1 files changed, 60 insertions, 0 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index bd34e7193..f681baf3e 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -102,6 +102,63 @@ sub check_bool()
close INDEP;
}
+sub check_is_singular()
+{
+ my $file = "$kdir/include/linux/list.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/list_is_singular/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_IS_SINGULAR 1\n";
+ }
+ close INNET;
+}
+
+sub check_clamp()
+{
+ my $file = "$kdir/include/linux/kernel.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/define\s+clamp/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_CLAMP 1\n";
+ }
+ close INNET;
+}
+
+sub check_proc_create()
+{
+ my $file = "$kdir/include/linux/proc_fs.h";
+ my $need_compat = 1;
+
+ open INNET, "<$file" or die "File not found: $file";
+ while (<INNET>) {
+ if (m/proc_create/) {
+ $need_compat = 0;
+ last;
+ }
+ }
+
+ if ($need_compat) {
+ $out.= "\n#define NEED_PROC_FS 1\n";
+ }
+ close INNET;
+}
+
sub check_other_dependencies()
{
check_spin_lock();
@@ -109,6 +166,9 @@ sub check_other_dependencies()
check_snd_ctl_boolean_mono_info();
check_snd_pcm_rate_to_rate_bit();
check_bool();
+ check_is_singular();
+ check_clamp();
+ check_proc_create();
}
# Do the basic rules