Bug 238928

Summary: sys/jail.h isn't C++ safe
Product: Base System Reporter: Yuri Victorovich <yuri>
Component: miscAssignee: freebsd-jail (Nobody) <jail>
Status: Closed FIXED    
Severity: Affects Only Me CC: emaste, jamie, markj
Priority: ---    
Version: 12.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
jail.cpp
none
stat.cpp none

Description Yuri Victorovich freebsd_committer freebsd_triage 2019-07-01 16:00:31 UTC
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.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2019-07-01 16:02:01 UTC
Created attachment 205469 [details]
jail.cpp
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2019-07-01 16:02:19 UTC
Created attachment 205470 [details]
stat.cpp
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-08-29 22:25:34 UTC
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
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-09-04 00:25:29 UTC
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