mirror of
https://github.com/tbsdtv/media_build.git
synced 2025-07-23 04:13:02 +02:00
Make it to compile with some distro-patched kernels
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
#include <linux/i2c-dev.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
|
||||
#ifdef NEED_HEX_TO_BIN
|
||||
#include <linux/ctype.h>
|
||||
static inline int hex_to_bin(char ch)
|
||||
{
|
||||
|
@@ -439,6 +439,28 @@ sub check_autosuspend_delay()
|
||||
$out.= "\n#define NEED_AUTOSUSPEND_DELAY 1\n";
|
||||
}
|
||||
|
||||
|
||||
sub check_hex_to_bin()
|
||||
{
|
||||
my @files = ( "$kdir/include/linux/kernel.h" );
|
||||
|
||||
foreach my $file ( @files ) {
|
||||
open IN, "<$file" or die "File not found: $file";
|
||||
while (<IN>) {
|
||||
if (m/hex_to_bin/) {
|
||||
close IN;
|
||||
# definition found. No need for compat
|
||||
return;
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
}
|
||||
|
||||
# definition not found. This means that we need compat
|
||||
$out.= "\n#define NEED_HEX_TO_BIN 1\n";
|
||||
}
|
||||
|
||||
|
||||
sub check_other_dependencies()
|
||||
{
|
||||
check_spin_lock();
|
||||
|
Reference in New Issue
Block a user