From 3ac0fd944a5bcf7e4ed614be23435dd28002fbc5 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Wed, 20 Apr 2011 02:29:53 -0600 Subject: [PATCH] update getdtablesize patch to include lib/unistd.in.h content --- debian/patches/getdtablesize-missing.diff | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/debian/patches/getdtablesize-missing.diff b/debian/patches/getdtablesize-missing.diff index 94561b3..46839c4 100644 --- a/debian/patches/getdtablesize-missing.diff +++ b/debian/patches/getdtablesize-missing.diff @@ -107,3 +107,33 @@ index bb79c0d..0a22af3 100644 ## 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 + + -- 2.30.2