Rejecting non-Linux pivot_root(2).
Some non-Linux systems implement pivot_root(2), even if they don't document that. An example is MacOS: $ grepc pivot_root / 2>/dev/null .../sys/sysproto.h:3012: int pivot_root(struct proc *, struct pivot_root_args *, int *); Since the prototype of the syscall differs from that of Linux, we can't use that syscall. Let's make sure the test only detects pivot_root(2) under Linux. Also, rename the feature macro to make clear that it's only about Linux's pivot_root(2). This closes #737 issue on GitHub.
This commit is contained in:
@@ -61,11 +61,14 @@ fi
|
||||
|
||||
|
||||
nxt_feature="Linux pivot_root()"
|
||||
nxt_feature_name=NXT_HAVE_PIVOT_ROOT
|
||||
nxt_feature_name=NXT_HAVE_LINUX_PIVOT_ROOT
|
||||
nxt_feature_run=no
|
||||
nxt_feature_incs=
|
||||
nxt_feature_libs=
|
||||
nxt_feature_test="#include <sys/syscall.h>
|
||||
#if !defined(__linux__)
|
||||
# error
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
return SYS_pivot_root;
|
||||
|
||||
Reference in New Issue
Block a user