> On Dec 29, 2023, at 10:18, Nuno Teixeira <edua...@freebsd.org> wrote:
>
> Hello all,
>
> From 1500007 to 1500008 devel/nspr (dependency of firefox) fails:
>
> ###
> cc -o prmapopt.o -c -fvisibility=hidden -O2 -pipe
> -fstack-protector-strong -fno-strict-aliasing -ansi -Wall -fPIC -UDEBUG
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DNDEBUG=1
> -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1
> -DFREEBSD=1 -DHAVE_BSD_FLOCK=1 -DHAVE_SOCKLEN_T=1
> -DHAVE_POINTER_LOCALTIME_R=1 -DHAVE_DLADDR=1 -DHAVE_LCHOWN=1
> -DHAVE_SETPRIORITY=1 -DHAVE_STRERROR=1 -DHAVE_SYSCALL=1
> -DHAVE_SECURE_GETENV=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DFORCE_PR_LOG
> -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_
> -I../../../dist/include/nspr -I./../../pr/include
> -I../../../pr/include/private prmapopt.c
> In file included from prmapopt.c:46:
> /usr/include/netinet/tcp.h:82:8: error: unknown type name 'inline'
> 82 | static inline uint16_t
> | ^
> /usr/include/netinet/tcp.h:82:23: error: expected ';' after top level
> declarator
> 82 | static inline uint16_t
> | ^
> /usr/include/netinet/tcp.h:88:8: error: unknown type name 'inline'
> 88 | static inline void
> | ^
> 3 errors generated.
> ###
>
> Any clues?
You are compiling with -ansi, which means C89. C89 does not support inline.
I think support for inline was added in C99.
I think we have two options:
1. Build the ports with a C version of at least C99.
2. Remove the inline from tcp_[gs]et_flags().
Best regards
Michael
> --
> Nuno Teixeira
> FreeBSD Committer (ports)