Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2018 20:27:51 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r459550 - head/devel/rubygem-eventmachine/files
Message-ID:  <201801202027.w0KKRpNN000256@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sat Jan 20 20:27:51 2018
New Revision: 459550
URL: https://svnweb.freebsd.org/changeset/ports/459550

Log:
  Fix build with clang 6
  
  em.cpp:1242:59: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long &>' and 'int')
                  if (bind (sd, (struct sockaddr *)&bind_to, bind_to_len) < 0) {
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
  
  PR:		225304
  Reported by:	pkg-fallout

Added:
  head/devel/rubygem-eventmachine/files/
  head/devel/rubygem-eventmachine/files/patch-ext_em.cpp   (contents, props changed)

Added: head/devel/rubygem-eventmachine/files/patch-ext_em.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/rubygem-eventmachine/files/patch-ext_em.cpp	Sat Jan 20 20:27:51 2018	(r459550)
@@ -0,0 +1,47 @@
+--- ext/em.cpp.orig	2018-01-18 19:46:12 UTC
++++ ext/em.cpp
+@@ -375,7 +375,7 @@ void EventMachine_t::_InitializeLoopBrea
+ 	for (i=0; i < 100; i++) {
+ 		int r = (rand() % 10000) + 20000;
+ 		LoopBreakerTarget.sin_port = htons (r);
+-		if (bind (sd, (struct sockaddr*)&LoopBreakerTarget, sizeof(LoopBreakerTarget)) == 0)
++		if (::bind (sd, (struct sockaddr*)&LoopBreakerTarget, sizeof(LoopBreakerTarget)) == 0)
+ 			break;
+ 	}
+ 
+@@ -1239,7 +1239,7 @@ const uintptr_t EventMachine_t::ConnectT
+ 			snprintf (buf, sizeof(buf)-1, "invalid bind address: %s", gai_strerror(gai));
+ 			throw std::runtime_error (buf);
+ 		}
+-		if (bind (sd, (struct sockaddr *)&bind_to, bind_to_len) < 0) {
++		if (::bind (sd, (struct sockaddr *)&bind_to, bind_to_len) < 0) {
+ 			close (sd);
+ 			throw std::runtime_error ("couldn't bind to address");
+ 		}
+@@ -1620,7 +1620,7 @@ const uintptr_t EventMachine_t::CreateTc
+ 	}
+ 
+ 
+-	if (bind (sd_accept, (struct sockaddr *)&bind_here, bind_here_len)) {
++	if (::bind (sd_accept, (struct sockaddr *)&bind_here, bind_here_len)) {
+ 		//__warning ("binding failed");
+ 		goto fail;
+ 	}
+@@ -1667,7 +1667,7 @@ const uintptr_t EventMachine_t::OpenData
+ 	if (!SetSocketNonblocking (sd))
+ 		goto fail;
+ 
+-	if (bind (sd, (struct sockaddr *)&bind_here, bind_here_len) != 0)
++	if (::bind (sd, (struct sockaddr *)&bind_here, bind_here_len) != 0)
+ 		goto fail;
+ 
+ 	{ // Looking good.
+@@ -1953,7 +1953,7 @@ const uintptr_t EventMachine_t::CreateUn
+ 		#endif
+ 	}
+ 
+-	if (bind (sd_accept, (struct sockaddr*)&s_sun, sizeof(s_sun))) {
++	if (::bind (sd_accept, (struct sockaddr*)&s_sun, sizeof(s_sun))) {
+ 		//__warning ("binding failed");
+ 		goto fail;
+ 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801202027.w0KKRpNN000256>