[Bug 10791] New: run-init changes to libbb/capability.c breaks compile with Android NDK API <21

bugzilla at busybox.net bugzilla at busybox.net
Wed Feb 21 02:46:05 UTC 2018


https://bugs.busybox.net/show_bug.cgi?id=10791

            Bug ID: 10791
           Summary: run-init changes to libbb/capability.c breaks compile
                    with Android NDK API <21
           Product: Busybox
           Version: 1.28.x
          Hardware: Other
                OS: Other
            Status: NEW
          Severity: critical
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: osm0sis at outlook.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

CC      libbb/capability.o
libbb/capability.c: In function 'getcaps':
libbb/capability.c:94:3: error: '_LINUX_CAPABILITY_U32S_3' undeclared (first
use in this function)
   _LINUX_CAPABILITY_U32S_3, /* = 2 (fits into byte) */
   ^
libbb/capability.c:94:3: note: each undeclared identifier is reported only once
for each function it appears in
libbb/capability.c:95:3: error: '_LINUX_CAPABILITY_U32S_2' undeclared (first
use in this function)
   _LINUX_CAPABILITY_U32S_2, /* = 2 */
   ^
libbb/capability.c:96:3: error: '_LINUX_CAPABILITY_U32S_1' undeclared (first
use in this function)
   _LINUX_CAPABILITY_U32S_1, /* = 1 */
   ^
libbb/capability.c:111:8: error: '_LINUX_CAPABILITY_VERSION_1' undeclared
(first use in this function)
   case _LINUX_CAPABILITY_VERSION_1:
        ^
libbb/capability.c:112:15: warning: assignment makes integer from pointer
without a cast
    caps->u32s = _LINUX_CAPABILITY_U32S_1;
               ^
libbb/capability.c:114:8: error: '_LINUX_CAPABILITY_VERSION_2' undeclared
(first use in this function)
   case _LINUX_CAPABILITY_VERSION_2:
        ^
libbb/capability.c:115:15: warning: assignment makes integer from pointer
without a cast
    caps->u32s = _LINUX_CAPABILITY_U32S_2;
               ^
libbb/capability.c:117:8: error: '_LINUX_CAPABILITY_VERSION_3' undeclared
(first use in this function)
   case _LINUX_CAPABILITY_VERSION_3:
        ^
libbb/capability.c:118:15: warning: assignment makes integer from pointer
without a cast
    caps->u32s = _LINUX_CAPABILITY_U32S_3;
               ^
make[1]: *** [scripts/Makefile.build:198: libbb/capability.o] Error 1

Prior to
https://git.busybox.net/busybox/commit/?id=200bcc851acbe1ba30fe90b5cf918f88370a5d15
this could be avoided by disabling CONFIG_FEATURE_SETPRIV_CAPABILITIES +
CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES, but now is unavoidable without
disabling CONFIG_PLATFORM_LINUX (so, unavoidable). I have verified this by
reverting the 3 run-init commits in 1.28.1 to date and a basic build is able to
complete without issue after those config changes to avoid the include.

For reference, the only _LINUX_CAPABILITY define in linux/capability.h prior to
Android NDK API 21 is "#define _LINUX_CAPABILITY_VERSION 0x19980330"

Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list