require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NET_IF_PFLOG_H_)) {
    eval 'sub _NET_IF_PFLOG_H_ () {1;}' unless defined(&_NET_IF_PFLOG_H_);
    eval 'sub PFLOGIFS_MAX () {16;}' unless defined(&PFLOGIFS_MAX);
    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 () { &offsetof(\'struct pfloghdr\',  &pad);}' unless defined(&PFLOG_REAL_HDRLEN);
    eval 'sub OLD_PFLOG_HDRLEN () {$sizeof{\'struct old_pfloghdr\'};}' unless defined(&OLD_PFLOG_HDRLEN);
    if(defined(&_KERNEL)) {
	if((defined(&NPFLOG) ? &NPFLOG : 0) > 0) {
	    eval 'sub PFLOG_PACKET {
	        my($i,$x,$a,$b,$c,$d,$e,$f,$g,$h) = @_;
    		eval q( &pflog_packet($i,$a,$b,$c,$d,$e,$f,$g,$h));
	    }' unless defined(&PFLOG_PACKET);
	} else {
	    eval 'sub PFLOG_PACKET {
	        my($i,$x,$a,$b,$c,$d,$e,$f,$g,$h) = @_;
    		eval q((( &void)0));
	    }' unless defined(&PFLOG_PACKET);
	}
    }
}
1;
