3 # Copyright (C) 2008-2009 Ksplice, Inc.
4 # Authors: Anders Kaseorg, Jeff Arnold, Tim Abbott
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License, version 2.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 my $dir = abs_path
(dirname
($0) . "/ksplice-patch");
28 if (/^-ksplice-cflags-api=1$/) {
30 push @cmd, qw(-D__DATE__="<{DATE...}>" -D__TIME__="<{TIME}>");
36 my $pid = open3
('<&STDIN', '>&STDOUT', \
*ERROR
, @cmd);
38 next if /^<command[- ]line>(?::\d+:\d+)?: warning: "(?:__DATE__|__TIME__)" redefined$/;
42 waitpid($pid, 0) == $pid and ($?
& 127) == 0 or die;