diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-24 08:44:03 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-24 08:44:03 -0200 |
commit | ec60228e845ea89c0f4e3e5b2a0d7f3ce832f182 (patch) | |
tree | 18c9228fdf49124f3998a8d707dfee65a57d4011 /v4l/scripts | |
parent | 33b3d5674be358c590d4608cbf57101fbfa25632 (diff) | |
download | mediapointer-dvb-s2-ec60228e845ea89c0f4e3e5b2a0d7f3ce832f182.tar.gz mediapointer-dvb-s2-ec60228e845ea89c0f4e3e5b2a0d7f3ce832f182.tar.bz2 |
Fix compilation with RHEL 5.2 kernel
From: Mauro Carvalho Chehab <mchehab@redhat.com>
RHEL 5 already declares bool. Still, there are some warnings that
probably indicate that something else needs to be done for the code to
work with RHEL5.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index e538c925b..bd34e7193 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -83,12 +83,32 @@ sub check_snd_ctl_boolean_mono_info() close INNET; } +sub check_bool() +{ + my $file = "$kdir/include/linux/types.h"; + my $old_syntax = 1; + + open INDEP, "<$file" or die "File not found: $file"; + while (<INDEP>) { + if (m/^\s*typedef.*bool;/) { + $old_syntax = 0; + last; + } + } + + if ($old_syntax) { + $out.= "\n#define NEED_BOOL_TYPE 1\n"; + } + close INDEP; +} + sub check_other_dependencies() { check_spin_lock(); check_sound_driver_h(); check_snd_ctl_boolean_mono_info(); check_snd_pcm_rate_to_rate_bit(); + check_bool(); } # Do the basic rules |