+diff --git a/configure.ac b/configure.ac
+index 818dbd9..0919132 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,6 +129,12 @@ if test "$gl_gcc_warnings" = yes; then
+ AC_SUBST([GNULIB_WARN_CFLAGS])
+ fi
+
++gl_FUNC_GETDTABLESIZE
++if test $HAVE_GETDTABLESIZE = 0; then
++ AC_LIBOBJ([getdtablesize])
++fi
++gl_UNISTD_MODULE_INDICATOR([getdtablesize])
++
+ # cc -E produces incorrect asm files on SVR4, so postprocess it.
+ ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
+ AC_SUBST([ASCPPPOST])
+diff --git a/debian/patches/series b/debian/patches/series
+index f008915..6015402 100644
+--- a/debian/patches/series
++++ b/debian/patches/series
+@@ -1,2 +1 @@
+-getdtablesize-missing.diff
+ zless-LESSOPEN.diff