← Commit list

b0c0b6d5b

Denys Vlasenko
Denys Vlasenko
2017-07-07
SUCCESS Duration: 144s

Subject

setpriv: remove dependency on libcap headers

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/setpriv.c+8 -1
@@ -81,7 +81,14 @@
#if ENABLE_FEATURE_SETPRIV_CAPABILITIES
#include <linux/capability.h>
-#include <sys/capability.h>
+// #include <sys/capability.h>
+// This header is in libcap, but the functions are in libc.
+// Comment in the header says this above capset/capget:
+/* system calls - look to libc for function to system call mapping */
+extern int capset(cap_user_header_t header, cap_user_data_t data);
+extern int capget(cap_user_header_t header, const cap_user_data_t data);
+// so for bbox, let's just repeat the declarations.
+// This way, libcap needs not be installed in build environment.
#endif
#include <sys/prctl.h>
#include "libbb.h"