Build failure on the 13.1 based source due to "unused variables"

7 views
Skip to first unread message

a_ba...@ymail.com

unread,
Nov 28, 2022, 6:45:15 PM11/28/22
to HardenedBSD Users
I'm attempting to build from source and when getting to the kern_procctl.c file I keep getting unused variables error.  I've pasted the output below.  I've attempted removing the #ifndef PAX lines to see if maybe the "vm" variable, and the others, were being excluded and that would be why they were being marked as unused.  I have also gone onto the FreeBSD forums to see if I could find a fix to the issue there to no avail.

Any suggestions would be greatly appreciated.  Been at this for two days before coming here.  I prefer to try to fix something before asking for help.

This is the error output:

--- kern_procctl.o ---
/usr/src/sys/kern/kern_procctl.c:834:18: error: unused variable 'vm' [-Werror,-Wunused-variable]
        struct vmspace *vm;
                        ^
/usr/src/sys/kern/kern_procctl.c:835:11: error: unused variable 'map' [-Werror,-Wunused-variable]
        vm_map_t map;
                 ^
/usr/src/sys/kern/kern_procctl.c:863:8: error: incomplete type 'void' is not assignable
        *data = d;
        ~~~~~ ^
/usr/src/sys/kern/kern_procctl.c:870:2: error: use of undeclared identifier 'vm'
        vm = vmspace_acquire_ref(p);
        ^
/usr/src/sys/kern/kern_procctl.c:871:6: error: use of undeclared identifier 'vm'
        if (vm != NULL) {
            ^
/usr/src/sys/kern/kern_procctl.c:872:8: error: use of undeclared identifier 'vm'
                if ((vm->vm_map.flags & MAP_WXORX) != 0)
                     ^
/usr/src/sys/kern/kern_procctl.c:872:27: error: use of undeclared identifier 'MAP_WXORX'
                if ((vm->vm_map.flags & MAP_WXORX) != 0)
                                        ^
/usr/src/sys/kern/kern_procctl.c:874:16: error: use of undeclared identifier 'vm'
                vmspace_free(vm);
Reply all
Reply to author
Forward
0 new messages