From: Junio C Hamano <junkio@cox.net>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org, Christopher Faylor <me@cgf.cx>
Subject: Re: cygwin-latest: compile errors related to sockaddr_storage, dirent->d_type and dirent->d_ino
Date: Thu, 19 Jan 2006 17:13:32 -0800 [thread overview]
Message-ID: <7vzmlr7lc3.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 81b0412b0601180547q4a812c8xb632de6ab13a5e62@mail.gmail.com
Alex Riesen <raa.lkml@gmail.com> writes:
> For reasons unknown, cygwin decided to use our sockaddr_storage.
> As it is redefined to sockaddr_in it'd cause compilation errors in
> cygwin headers.
Just removing "-Dsockaddr_storage=sockaddr_in" from ALL_CFLAGS
seems to solve the problem for new Cygwin.
I doubt that -Dsockaddr_storage=sockaddr_in should be tied to
NO_IPV6. Maybe a better approach would be something like the
attached patch.
Although /usr/include/cygwin/in.h seems to have struct sockaddr_in6,
getaddrinfo() and friends still do not seem to be there, so
NO_IPV6 still remains in effect on Cygwin.
Comments?
-- >8 --
[PATCH] Makefile: do not assume lack of IPV6 means no sockaddr_storage.
Noticed first by Alex, that the latest Cygwin now properly has
sockaddr_storage.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
Makefile | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
0b61a10bb258ae0971bce3e01e40a5a9e5d9537f
diff --git a/Makefile b/Makefile
index f6d9e0a..e8f4b24 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,9 @@ all:
#
# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
#
+# Define NO_SOCKADDR_STORAGE if your platform does not have struct
+# sockaddr_storage.
+#
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
@@ -342,7 +345,14 @@ ifdef NO_MMAP
COMPAT_OBJS += compat/mmap.o
endif
ifdef NO_IPV6
- ALL_CFLAGS += -DNO_IPV6 -Dsockaddr_storage=sockaddr_in
+ ALL_CFLAGS += -DNO_IPV6
+endif
+ifdef NO_SOCKADDR_STORAGE
+ifdef NO_IPV6
+ ALL_CFLAGS += -Dsockaddr_storage=sockaddr_in
+else
+ ALL_CFLAGS += -Dsockaddr_storage=sockaddr_in6
+endif
endif
ifdef PPC_SHA1
--
1.1.3-gacdd
next prev parent reply other threads:[~2006-01-20 1:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 13:47 cygwin-latest: compile errors related to sockaddr_storage, dirent->d_type and dirent->d_ino Alex Riesen
2006-01-19 5:29 ` Christopher Faylor
2006-01-19 8:59 ` Junio C Hamano
2006-01-19 16:10 ` Christopher Faylor
2006-01-19 20:34 ` Christopher Faylor
2006-01-19 21:16 ` Linus Torvalds
2006-01-19 21:28 ` Christopher Faylor
2006-01-19 21:44 ` Linus Torvalds
2006-01-19 21:51 ` Christopher Faylor
2006-01-20 1:13 ` [PATCH] fsck-objects: support platforms without d_ino in struct dirent Junio C Hamano
2006-01-20 3:38 ` Christopher Faylor
2006-01-19 10:42 ` cygwin-latest: compile errors related to sockaddr_storage, dirent->d_type and dirent->d_ino Alex Riesen
2006-01-19 18:31 ` Christopher Faylor
2006-01-19 22:08 ` Alex Riesen
2006-01-19 22:51 ` Christopher Faylor
2006-01-19 12:51 ` Petr Baudis
2006-01-19 15:04 ` Alex Riesen
2006-01-19 13:00 ` Petr Baudis
2006-01-19 15:07 ` Alex Riesen
2006-01-20 1:13 ` Junio C Hamano [this message]
2006-01-20 13:23 ` Alex Riesen
2006-01-20 1:13 ` [PATCH] DT_UNKNOWN: do not fully trust existence of DT_UNKNOWN Junio C Hamano
2006-01-20 15:01 ` Alex Riesen
2006-01-20 19:10 ` Junio C Hamano
2006-01-20 21:53 ` Alex Riesen
2006-01-21 8:09 ` Junio C Hamano
2006-01-23 13:07 ` Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vzmlr7lc3.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=me@cgf.cx \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).