SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,27 @@
Index: ext/ed.cpp
--- ext/ed.cpp.orig
+++ ext/ed.cpp
@@ -1115,11 +1115,8 @@ void ConnectionDescriptor::_WriteOutboundData()
}
#endif
- // We should never have gotten here if there were no data to write,
- // so assert that as a sanity check.
- // Don't bother to make sure nbytes is less than output_buffer because
- // if it were we probably would have crashed already.
- assert (nbytes > 0);
+ if (nbytes <= 0)
+ return;
assert (GetSocket() != INVALID_SOCKET);
#ifdef HAVE_WRITEV
@@ -1862,6 +1859,9 @@ void DatagramDescriptor::Write()
EpollEvent.events |= EPOLLOUT;
assert (MyEventMachine);
MyEventMachine->Modify (this);
+ #endif
+ #ifdef HAVE_KQUEUE
+ MyEventMachine->ArmKqueueWriter (this);
#endif
#ifdef HAVE_KQUEUE
bKqueueArmWrite = SelectForWrite();

View file

@ -0,0 +1,48 @@
Index: ext/em.cpp
--- ext/em.cpp.orig
+++ ext/em.cpp
@@ -375,7 +375,7 @@ void EventMachine_t::_InitializeLoopBreaker()
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::ConnectToServer (const
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::CreateTcpServer (const
}
- 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::OpenDatagramSocket (co
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::CreateUnixDomainServer
#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;
}

View file

@ -0,0 +1,12 @@
Index: ext/extconf.rb
--- ext/extconf.rb.orig
+++ ext/extconf.rb
@@ -147,7 +147,7 @@ if RbConfig::CONFIG["host_os"] =~ /mingw/
add_define "FD_SETSIZE=32767" unless found
end
-# Main platform invariances:
+create_makefile "rubyeventmachine"
case RUBY_PLATFORM
when /mswin32/, /mingw32/, /bccwin32/

View file

@ -0,0 +1,18 @@
Skip test that crashes with SIGILL. This same code also crashes
previous versions, so it is not a regression, just a newly added
test. Details at:
https://github.com/eventmachine/eventmachine/issues/777
Index: tests/test_exc.rb
--- tests/test_exc.rb.orig
+++ tests/test_exc.rb
@@ -32,7 +32,7 @@ class TestSomeExceptions < Test::Unit::TestCase
}
end
- def test_exception_on_unbind
+ def skip_test_exception_on_unbind
assert_raises(DoomedConnectionError) {
EM.run {
EM.connect("localhost", 8888, DoomedConnection)