• compiling mbse on FreeBSD 9.2

    From Stephen Walsh@3:633/280 to All on Sunday, February 02, 2014 00:43:29
    Hello everybody.

    Getting this error when compiling on FreeBSD 9.2.
    From what I have been reading FreeBSD 9.x+ has droped utmp.h support.


    gcc -O2 -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -D_REENTRANT -I/usr/local/include
    -c utmp.c
    utmp.c:34:18: error: utmp.h: No such file or directory
    In file included from utmp.c:52:
    utmp.h:10: warning: 'struct utmp' declared inside parameter list
    utmp.h:10: warning: its scope is only this definition or declaration, which is probably not what you want
    utmp.c: In function 'checkutmp':
    utmp.c:141: warning: implicit declaration of function 'setutent'
    utmp.c:152: warning: implicit declaration of function 'getutent'
    utmp.c:152: warning: assignment makes pointer from integer without a cast utmp.c:153: error: dereferencing pointer to incomplete type
    utmp.c:157: error: dereferencing pointer to incomplete type
    utmp.c:157: error: 'utent' has an incomplete type
    utmp.c:162: warning: implicit declaration of function 'endutent'
    utmp.c:177: error: invalid use of undefined type 'struct utmp'
    utmp.c:186: error: invalid use of undefined type 'struct utmp'
    utmp.c:186: error: invalid use of undefined type 'struct utmp'
    utmp.c:199: error: invalid use of undefined type 'struct utmp'
    utmp.c:199: error: invalid use of undefined type 'struct utmp'
    utmp.c:200: warning: implicit declaration of function 'getutline'
    utmp.c:200: warning: assignment makes pointer from integer without a cast utmp.c:201: error: invalid use of undefined type 'struct utmp'
    utmp.c:201: error: dereferencing pointer to incomplete type
    utmp.c:201: error: dereferencing pointer to incomplete type
    utmp.c:203: error: invalid use of undefined type 'struct utmp'
    utmp.c:204: error: invalid use of undefined type 'struct utmp'
    utmp.c:205: error: invalid use of undefined type 'struct utmp'
    utmp.c:206: error: invalid use of undefined type 'struct utmp'
    utmp.c:213: error: invalid use of undefined type 'struct utmp'
    utmp.c:214: error: invalid use of undefined type 'struct utmp'
    utmp.c:216: error: invalid use of undefined type 'struct utmp'
    utmp.c: At top level:
    utmp.c:256: error: conflicting types for 'updwtmp'
    utmp.h:10: error: previous declaration of 'updwtmp' was here
    utmp.c: In function 'updwtmp':
    utmp.c:261: error: dereferencing pointer to incomplete type
    utmp.c: In function 'setutmp':
    utmp.c:308: error: storage size of 'utline' isn't known
    utmp.c:330: warning: suggest parentheses around assignment used as truth value utmp.c:336: warning: assignment makes pointer from integer without a cast utmp.c:336: warning: suggest parentheses around assignment used as truth value utmp.c:337: error: dereferencing pointer to incomplete type
    utmp.c:366: error: dereferencing pointer to incomplete type
    utmp.c:391: warning: implicit declaration of function 'pututline'
    utmp.c:397: error: 'utent' has an incomplete type
    utmp.c:308: warning: unused variable 'utline'
    gmake[1]: *** [utmp.o] Error 1
    gmake[1]: Leaving directory `/usr/local/opt/mbse/mbsebbs-1.0.1/unix'
    gmake: *** [all] Error 2




    Stephen

    --- GoldED-NSF/LNX 1.1.5-b20130414
    * Origin: Dragon's Lair (3:633/280)