require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NET_IF_PFLOG_H_)) {
    eval 'sub _NET_IF_PFLOG_H_ () {1;}' unless defined(&_NET_IF_PFLOG_H_);
    require 'net/pfvar.ph';
    eval 'sub PFLOG_RULESET_NAME_SIZE () {16;}' unless defined(&PFLOG_RULESET_NAME_SIZE);
    eval 'sub PFLOG_HDRLEN () {$sizeof{\'struct pfloghdr\'};}' unless defined(&PFLOG_HDRLEN);
    eval 'sub PFLOG_REAL_HDRLEN () { &PFLOG_HDRLEN;}' unless defined(&PFLOG_REAL_HDRLEN);
    eval 'sub PFLOG_OLD_HDRLEN () { &offsetof(\'struct pfloghdr\',  &pad);}' unless defined(&PFLOG_OLD_HDRLEN);
    if(defined(&_KERNEL)) {
	if((defined(&NPFLOG) ? &NPFLOG : undef) > 0) {
	    eval 'sub PFLOG_PACKET {
	        my($a,$b,$c,$d,$e) = @_;
    		eval q( &pflog_packet($a,$b,$c,$d,$e));
	    }' unless defined(&PFLOG_PACKET);
	} else {
	    eval 'sub PFLOG_PACKET {
	        my($a,$b,$c,$d,$e) = @_;
    		eval q((( &void)0));
	    }' unless defined(&PFLOG_PACKET);
	}
    }
}
1;
