<<< Date Index >>>     <<< Thread Index >>>

Re: possible missing include in 1.5.13



On Sun, 29 Oct 2006, Brendan Cully wrote:

On Wednesday, 04 October 2006 at 16:50, David Haguenauer wrote:
Hi all,

In order to compile mutt-1.5.13 on a machine with an old compiler
suite (based on GCC 3.3), I had to add an include directive to file

Actually it's the machine rather than the compiler that should determine this. One thing to watch out for is that some old machines couldn't mix one of the flavors of <time.h> vs <sys/time.h> with the header that declares the select() function.

  return select (conn->fd + 1, &rfds, NULL, NULL, &tv);

$ diff -u mutt_socket.c{~,}
+++ mutt_socket.c       Wed Oct  4 21:13:20 2006
@@ -38,6 +38,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/socket.h>
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>

I tried the same patch on a more modern system (Fedora Core 4 on

(not all interesting machines are running Linux ;-)

AMD64, which is based on GCC 4.0.2), and compilation went fine. So I
assume including this patch wouldn't do any harm (assuming there is
any interest for making Mutt compatible with antique compiler suites).

Thanks for the report. I've applied the following variant:

diff -u -p -r3.18 mutt_socket.c
--- mutt_socket.c       5 Aug 2006 00:48:16 -0000       3.18
+++ mutt_socket.c       30 Oct 2006 02:52:18 -0000
@@ -38,6 +38,9 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
#include <sys/socket.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net