This symbol was only standardized in POSIX.1-2008, which is too recent. Although it has been available on at least FreeBSD and Linux systems before that, but dpkg supports other systems which might not have it.
@@ -85,6 +85,7 @@ DPKG_FUNC_C99_SNPRINTF
DPKG_CHECK_DECL([offsetof], [stddef.h])
DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
+DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
DPKG_CHECK_PROGNAME
DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
strnlen strndup strerror strsignal asprintf \
@@ -30,6 +30,10 @@ extern "C" {
#define offsetof(st, m) ((size_t)&((st *)NULL)->m)
#endif
+#ifndef HAVE_O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
+
/*
* Define WCOREDUMP if we don't have it already, coredumps won't be
* detected, though.