[SOLVED] compile pfctl error with struct pfioc_schedule_kill psk in pfctl.c

Started by trongkha, July 21, 2015, 11:25:05 AM

Previous topic - Next topic
I tried compile pfctl (clone from https://github.com/opnsense/src) by:
# cd /usr/src/sbin/pfctl
# make
But it returns error:


In pfctl.c, it have #include <pfvar.h>

In sys/net/pfvar.h , the struct pfioc_schedule_kill defined by line 1296

struct pfioc_schedule_kill {
   int      numberkilled;
   char      schedule[PF_RULE_LABEL_SIZE];
};


Why pfctl returns that error? Please help me with this error.

Your base system is likely FreeBSD and so the installed headers do not match the ones contained in src.git. Please use a proper chroot, installincludes workaround or do a full build as opposed to a partial (cd targetdir) approach. The tools.git builds world using:

# make base

reliably. The chroot is in /usr/local/stage:

# chroot /usr/local/stage /bin/sh