* let's use && operator rather than if-if
* define HAVE_CLOSE_RANGE only if callback is really avalable
Signed-off-by: Karel Zak <kzak@redhat.com>
#ifdef HAVE_SYS_SYSCALL_H
# include <sys/syscall.h>
-# if defined(SYS_close_range)
+# if !defined(HAVE_CLOSE_RANGE) && defined(SYS_close_range)
# include <sys/types.h>
-# ifndef HAVE_CLOSE_RANGE
static inline int close_range(unsigned int first, unsigned int last, int flags)
{
return syscall(SYS_close_range, first, last, flags);
}
-# endif
# define HAVE_CLOSE_RANGE 1
# endif /* SYS_close_range */