#11 Compile fails in FreeBSD 6,0

closed-invalid
nobody
None
5
2006-02-04
2006-02-03
Scott Price
No

If I include <sys/types.h> into utils.c everything
compiles and works fine.

Error:

gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ser2net\"
-DVERSION=\"2.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DUSE_UUCP_LOCKING=1 -DSTDC_HEADERS=1
-I. -I. -Wall -g -O2 -c utils.c
utils.c: In function `scan_tcp_port':
utils.c:77: error: `u_int32_t' undeclared (first use in
this function)
utils.c:77: error: (Each undeclared identifier is
reported only once
utils.c:77: error: for each function it appears in.)
utils.c:77: error: syntax error before numeric constant
*** Error code 1

Discussion

  • Corey Minyard
    Corey Minyard
    2006-02-04

    • status: open --> closed-invalid
     
  • Corey Minyard
    Corey Minyard
    2006-02-04

    Logged In: YES
    user_id=236278

    The line in question is:
    addr->sin_addr.s_addr = INADDR_ANY;
    and this code does not use any of the types from
    sys/types.h. The bug is in freebsd, whatever defines
    INADDR_ANY needs to include whatever is necessary for
    anything it uses. Them's the rules.