Attaching C++ testcases jail.cpp and stat.cpp > $ c++ -c jail.cpp && nm jail.o | grep jail > U _Z4jailP4jail > $ c++ -c stat.cpp && nm stat.o | grep stat > U stat jail call is compiled into a symbol as if it us a C++ function, which it is not, and the stat call is compiled fine.
Created attachment 205469 [details] jail.cpp
Created attachment 205470 [details] stat.cpp
A commit references this bug: Author: jamie Date: Sat Aug 29 22:24:42 UTC 2020 New revision: 364970 URL: https://svnweb.freebsd.org/changeset/base/364970 Log: Add __BEGIN_DECLS to jail.h to keep C++ happy. PR: 238928 Reported by: yuri@ Changes: head/sys/sys/jail.h
A commit references this bug: Author: jamie Date: Fri Sep 4 00:24:32 UTC 2020 New revision: 365321 URL: https://svnweb.freebsd.org/changeset/base/365321 Log: MFC r364970: Add __BEGIN_DECLS to jail.h to keep C++ happy. PR: 238928 Reported by: yuri@ Changes: _U stable/12/ stable/12/sys/sys/jail.h