Skip to content

Commit

Permalink
issue #2 use new __has_builtin macro
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbytedog committed Sep 27, 2017
1 parent 0e2aff5 commit f27bbf7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ $(SRCDIR)/configure : $(PROJECT_TEMP_DIR)/$(TARBALL)
mkdir -p $(SRCROOT)
tar -C $(SRCROOT) -xmf $(PROJECT_TEMP_DIR)/$(TARBALL)
if [ -d patches/$(VERSION) ] ; then \
for p in patches/$(VERSION)/* ; do \
for p in patches/$(VERSION)/*.patch ; do \
if [ -f $$p ] ; then \
patch -d $(SRCDIR) -p1 < $$p ; \
fi ; \
Expand Down
16 changes: 0 additions & 16 deletions patches/7.55.1/README.md

This file was deleted.

13 changes: 7 additions & 6 deletions patches/7.55.1/connect_c_ios8.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
--- curl-7.55.1/lib/connect.c 2017-09-26 18:31:48.000000000 -0700
+++ curl-7.55.1.patched/lib/connect.c 2017-09-26 18:35:36.000000000 -0700
@@ -1066,9 +1066,12 @@
--- curl-7.55.1/lib/connect.c 2017-08-12 06:28:13.000000000 -0700
+++ curl-7.55.1.patched/lib/connect.c 2017-09-26 21:12:11.000000000 -0700
@@ -1066,9 +1066,13 @@
endpoints.sae_dstaddr = &addr.sa_addr;
endpoints.sae_dstaddrlen = addr.addrlen;

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpartial-availability"
+#if __has_builtin(connectx)
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT,
NULL, 0, NULL, NULL);
+#pragma GCC diagnostic pop
+#else
+ rc = connect(sockfd, &addr.sa_addr, addr.addrlen);
+#endif
#elif defined(MSG_FASTOPEN) /* Linux */
if(conn->given->flags & PROTOPT_SSL)
rc = connect(sockfd, &addr.sa_addr, addr.addrlen);

0 comments on commit f27bbf7

Please sign in to comment.