exit(wrapper_exit_code);
}
-
+#if !defined(VC_ENABLE_API_NET) && !defined(VC_ENABLE_API_COMPAT) && !defined(VC_ENABLE_API_LEGACY)
+# error can not build 'chbind' without network virtualization API
+#endif
+
#if defined(VC_ENABLE_API_NET)
if (vc_isSupported(vcFEATURE_VNET)) {
make_nx(nid, bcast, nbaddrs, ips);
}
else
#endif
+#if defined(VC_ENABLE_API_COMPAT) || defined(VC_ENABLE_API_LEGACY)
if (vc_set_ipv4root(bcast,nbaddrs,ips)!=0) {
perror("chbind: vc_set_ipv4root()");
exit(wrapper_exit_code);
}
+#else
+ {
+ WRITE_MSG(2, "chbind: kernel does not provide network virtualization\n");
+ exit(wrapper_exit_code);
+ }
+#endif
if (!is_silent) {
size_t i;
static void
activateContext(xid_t xid, bool in_ctx,
- uint32_t xid_caps, int xid_flags)
+ uint32_t UNUSED xid_caps, int UNUSED xid_flags)
{
if (in_ctx) {
struct vc_ctx_flags flags = {
return 0;
}
+#else // VC_ENABLE_API_COMPAT
+static char *
+getInitPid_emulated(char UNUSED *buf, xid_t UNUSED xid)
+{
+ WRITE_MSG(2, "tools were built without compat API, getInitPid() not available\n");
+ return 0;
+}
#endif // VC_ENABLE_API_COMPAT
static char *