Bug 208021

Summary: cap_proc.c includes psx header which in some situations mandates libpsx linkage
Product: Tools Reporter: Andrew G. Morgan (morgan)
Component: libcapAssignee: Andrew G. Morgan (morgan)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: n/a Subsystem:
Regression: No Bisected commit-id:

Description Andrew G. Morgan 2020-06-01 19:44:11 UTC
It remains the intention that libpsx be an optional linkage to help an application observe a process wide common security context. However, for
backward compatibility this is not required.

Unfortunately, the fact libcap/cap_proc.c includes a reference to the psx header file, some build environments automatically force this library to be linked.

I think the resolution is to locally introduce the prototype for the affected function in cap_proc.c and not rely on the libpsx header.