OPNsense Forum

English Forums => Development and Code Review => Topic started by: trongkha on July 21, 2015, 11:25:05 am

Title: [SOLVED] compile pfctl error with struct pfioc_schedule_kill psk in pfctl.c
Post by: trongkha on July 21, 2015, 11:25:05 am
I tried compile pfctl (clone from https://github.com/opnsense/src) by:
# cd /usr/src/sbin/pfctl
# make
But it returns error:
(http://s8.postimg.org/newoffqdx/Capture.png)

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.
Title: Re: compile pfctl error with struct pfioc_schedule_kill psk in pfctl.c
Post by: franco on July 21, 2015, 02:16:09 pm
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