changeset 14062:a9b8cdb01be3

sys_select: Avoid warning about missing memset declaration on HP-UX 11. * lib/sys_select.in.h: On HP-UX, include also <string.h>.
author Bruno Haible <bruno@clisp.org>
date Fri, 31 Dec 2010 15:48:04 +0100
parents 3d7ddb7340dd
children 498997a431ee
files ChangeLog lib/sys_select.in.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-31  Bruno Haible  <bruno@clisp.org>
+
+	sys_select: Avoid warning about missing memset declaration on HP-UX 11.
+	* lib/sys_select.in.h: On HP-UX, include also <string.h>.
+
 2010-12-31  Bruno Haible  <bruno@clisp.org>
 
 	waitpid: Fix link error in C++ mode.
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -72,6 +72,11 @@
 /* Get the 'struct timeval' and 'fd_set' types and the FD_* macros
    on most platforms.  */
 # include <sys/time.h>
+/* On HP-UX 11, <sys/time.h> provides an FD_ZERO implementation
+   that relies on memset(), but without including <string.h>.  */
+# if defined __hpux
+#  include <string.h>
+# endif
 /* On native Windows platforms:
    Get the 'fd_set' type.  Also, gnulib's <sys/socket.h> redefines select
    so as to hide the declaration from <winsock2.h>.  */