## begin gnulib module getopt-posix
BUILT_SOURCES += $(GETOPT_H)
+diff --git a/lib/unistd.in.h b/lib/unistd.in.h
+index bffdf8f..21cf667 100644
+--- a/lib/unistd.in.h
++++ b/lib/unistd.in.h
+@@ -423,17 +423,19 @@ extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
+
+
+ #if @GNULIB_GETDTABLESIZE@
+-# if !@HAVE_GETDTABLESIZE@
+ /* Return the maximum number of file descriptors in the current process.
+ In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
+-extern int getdtablesize (void);
++# if !@HAVE_GETDTABLESIZE@
++_GL_FUNCDECL_SYS (getdtablesize, int, (void));
+ # endif
++_GL_CXXALIAS_SYS (getdtablesize, int, (void));
++_GL_CXXALIASWARN (getdtablesize);
+ #elif defined GNULIB_POSIXCHECK
+ # undef getdtablesize
+-# define getdtablesize() \
+- (GL_LINK_WARNING ("getdtablesize is unportable - " \
+- "use gnulib module getdtablesize for portability"), \
+- getdtablesize ())
++# if HAVE_RAW_DECL_GETDTABLESIZE
++_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
++ "use gnulib module getdtablesize for portability");
++# endif
+ #endif
+
+