Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5263

pivot_root is not available on ARM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None
    • Mesosphere Sprint 32
    • 1

    Description

      When compile on ARM, it will through error.
      The current code logic in src/linux/fs.cpp is:

      #ifdef __NR_pivot_root
        int ret = ::syscall(__NR_pivot_root, newRoot.c_str(), putOld.c_str());
      #elif __x86_64__
        // A workaround for systems that have an old glib but have a new
        // kernel. The magic number '155' is the syscall number for
        // 'pivot_root' on the x86_64 architecture, see
        // arch/x86/syscalls/syscall_64.tbl
        int ret = ::syscall(155, newRoot.c_str(), putOld.c_str());
      #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
        // A workaround for powerpc. The magic number '203' is the syscall
        // number for 'pivot_root' on the powerpc architecture, see
        // https://w3challs.com/syscalls/?arch=powerpc_64
        int ret = ::syscall(203, newRoot.c_str(), putOld.c_str());
      #else
      #error "pivot_root is not available"
      #endif
      

      Possible sollution is to add `unistd.h` header

      Attachments

        Issue Links

          Activity

            People

              janisz Tomasz Janiszewski
              janisz Tomasz Janiszewski
              Benjamin Mahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: