aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-08-21 16:51:08 -0500
committerRob Landley <rob@landley.net>2019-08-21 16:51:08 -0500
commite7a5d612d3c8c4f693c3059b75f4a8fa4e8f7d46 (patch)
tree0633f7dee935421b7f98fe3bb43cd19988a5d86e /scripts
parentb66fa58328888998b9085d379d8a40c1b23588fa (diff)
downloadtoybox-e7a5d612d3c8c4f693c3059b75f4a8fa4e8f7d46.tar.gz
Fix the unshare probe.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/genconfig.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh
index e1eff09f..3d89fd1e 100755
--- a/scripts/genconfig.sh
+++ b/scripts/genconfig.sh
@@ -33,10 +33,12 @@ probeconfig()
# Probe for container support on target
probesymbol TOYBOX_CONTAINER << EOF
+ #include <stdio.h>
+ #include <sys/syscall.h>
#include <linux/sched.h>
int x=CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET;
- int main(int argc, char *argv[]) { setns(0,0); return unshare(x); }
+ int main(int argc, char *argv[]){printf("%d", x+SYS_unshare+ SYS_setns);}
EOF
probesymbol TOYBOX_FIFREEZE -c << EOF