mike121 pushed a commit to branch wip-mingw-guile-2.2 in repository guile. commit 9bf1ae81e199cb62b378f4ba5c165b52af0ade9b Author: Michael Gran <spk...@yahoo.com> Date: Tue Apr 10 12:14:08 2018 -0700
Conditionally include netinet/tcp.h It is not present on MinGW. * configure.ac: (AC_CHECK_HEADERS) add netinet/tcp.h * socket.c: [HAVE_NETINET_TCP_H] conditionally include netinet/tcp.h --- configure.ac | 6 ++++-- libguile/socket.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 374b429..bddf143 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,8 @@ dnl define(GUILE_CONFIGURE_COPYRIGHT,[[ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Free Software Foundation, Inc. + 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, + 2018 Free Software Foundation, Inc. This file is part of GUILE @@ -682,6 +683,7 @@ AC_SUBST([SCM_I_GSC_HAVE_STRUCT_DIRENT64]) # fenv.h - available in C99, but not older systems # machine/fpu.h - on Tru64 5.1b, the declaration of fesetround(3) is in # this file instead of <fenv.h> +# netinet/tcp.h - missing on MinGW # process.h - mingw specific # sched.h - missing on MinGW # sys/sendfile.h - non-POSIX, found in glibc @@ -690,7 +692,7 @@ AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h memory.h process.h strin sys/dir.h sys/ioctl.h sys/select.h \ sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \ sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ -direct.h machine/fpu.h sched.h sys/sendfile.h]) +direct.h machine/fpu.h sched.h sys/sendfile.h netinet/tcp.h]) # "complex double" is new in C99, and "complex" is only a keyword if # <complex.h> is included diff --git a/libguile/socket.c b/libguile/socket.c index 71c17e8..3c2cd0a 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1998, 2000-2007, 2009, 2011-2015 +/* Copyright (C) 1996-1998, 2000-2007, 2009, 2011-2015, 2018 * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or @@ -40,7 +40,9 @@ #include <sys/un.h> #endif #include <netinet/in.h> +#ifdef HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif #include <netdb.h> #include <arpa/inet.h>