Skip to content

rsync 3.4.3 and later won't build for Linux < 5.6 out of the box due to openat2() #924

@mmayer

Description

@mmayer

While "configure" provides a command line option for disabling the use of openat2(), it doesn't try to detect on its own whether the target system supports the sys call. This means that just running ./configure && make against an older kernel will fail

gcc -I. -I. -I./popt -I./zlib -g -O2 -DHAVE_CONFIG_H -Wall -W  -c syscall.c -o syscall.o
syscall.c:38:10: fatal error: linux/openat2.h: No such file or directory
 #include <linux/openat2.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:72: recipe for target 'syscall.o' failed
make: *** [syscall.o] Error 1

This can be remedied by manually configuring rsync with "--disable-openat2", but I believe there is a better way. Ensuring SYS_openat2 is supported is a quick check that can be easily added to configure, making the experience automatic and seamless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions