Duplicated and confusing includes
include order in kio/src/ioslaves/file/file_unix.cpp :
#ifdef Q_OS_LINUX
#include <linux/fs.h>
#include <sys/ioctl.h>
#include <unistd.h> // For copy_file_range (and other stuff)
#if HAVE_STATX
#include <sys/stat.h>
#include <sys/sysmacros.h> // for makedev()
#endif
#endif // Q_OS_LINUX
#if HAVE_COPY_FILE_RANGE
#include <sys/types.h> // Must be before unistd.h
#include <unistd.h>
#endif
#if HAVE_SYS_XATTR_H
#include <sys/xattr.h>
// BSD uses a different include
#elif HAVE_SYS_EXTATTR_H
#include <sys/types.h> // For FreeBSD, this must be before sys/extattr.h
#include <sys/extattr.h>
#endif
instead of upper code couldnt we just use something like this :
#include <sys/types.h>
// space for pervent clang-format not to reorder includes
#include <unistd.h> // For copy_file_range (and other stuff)
#ifdef Q_OS_LINUX
#include <linux/fs.h>
#include <sys/ioctl.h>
#if HAVE_STATX
#include <sys/stat.h>
#include <sys/sysmacros.h> // for makedev()
#endif
#endif // Q_OS_LINUX
#if HAVE_SYS_XATTR_H
#include <sys/xattr.h>
// BSD uses a different include
#elif HAVE_SYS_EXTATTR_H
#include <sys/extattr.h>
#endif