summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rw-r--r--v4l/scripts/buildpatch11
1 files changed, 8 insertions, 3 deletions
diff --git a/v4l/scripts/buildpatch b/v4l/scripts/buildpatch
index 319c46cf0..beeba862a 100644
--- a/v4l/scripts/buildpatch
+++ b/v4l/scripts/buildpatch
@@ -48,7 +48,13 @@ sub kernel_version() {
sub filter_source ($$) {
my ($in,$out) = @_;
- my ($line,$if,$state);
+ my ($line,$if,$state,$mmkernel);
+
+ if (-e $LINUX . "/.mm") {
+ $mmkernel = 1;
+ } else {
+ $mmkernel = 0;
+ }
open IN, "<$in";
open OUT, ">$out";
@@ -64,9 +70,8 @@ sub filter_source ($$) {
}
if ($line =~ /^#ifdef MM_KERNEL/) {
chomp($line);
- $line =~ s@^#if\s*@@;
$state = "if";
- $if = eval $line;
+ $if = $mmkernel;
print OUT "/* BP #if $if ($line) */\n" if $DEBUG;
next;
}