pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/ruby-eventmachine Fix build with recent EV_SET



details:   https://anonhg.NetBSD.org/pkgsrc/rev/28feb22a70da
branches:  trunk
changeset: 340796:28feb22a70da
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Tue Oct 08 14:06:42 2019 +0000

description:
Fix build with recent EV_SET

diffstat:

 devel/ruby-eventmachine/distinfo                 |   3 +-
 devel/ruby-eventmachine/patches/patch-ext_em.cpp |  53 ++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletions(-)

diffs (69 lines):

diff -r a1ae75dcdd2e -r 28feb22a70da devel/ruby-eventmachine/distinfo
--- a/devel/ruby-eventmachine/distinfo  Tue Oct 08 12:40:54 2019 +0000
+++ b/devel/ruby-eventmachine/distinfo  Tue Oct 08 14:06:42 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.20 2018/09/23 14:19:05 taca Exp $
+$NetBSD: distinfo,v 1.21 2019/10/08 14:06:42 ryoon Exp $
 
 SHA1 (eventmachine-1.2.7.gem) = 7a5b2896e210fac9759c786ee4510f265f75b481
 RMD160 (eventmachine-1.2.7.gem) = 5c2c8344ce60461787dbae8114ec884a162ac7e7
 SHA512 (eventmachine-1.2.7.gem) = fdbcf9fc933e2414e70f8f48153e9ba6ed7a0029cdf49cdcb4ab72ab26683e727a36c099f017f20681f9c361179461743e501278ca9bd5612e693e26867cc516
 Size (eventmachine-1.2.7.gem) = 247296 bytes
+SHA1 (patch-ext_em.cpp) = 6538a9e289aa7a1ea048854e838c4f336e5db00b
diff -r a1ae75dcdd2e -r 28feb22a70da devel/ruby-eventmachine/patches/patch-ext_em.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ruby-eventmachine/patches/patch-ext_em.cpp  Tue Oct 08 14:06:42 2019 +0000
@@ -0,0 +1,53 @@
+$NetBSD: patch-ext_em.cpp,v 1.1 2019/10/08 14:06:43 ryoon Exp $
+
+* Fix build with recent NetBSD 9.99
+
+--- ext/em.cpp.orig    2019-10-08 05:16:57.314742512 +0000
++++ ext/em.cpp
+@@ -20,6 +20,10 @@ See the file COPYING for complete licens
+ // THIS ENTIRE FILE WILL EVENTUALLY BE FOR UNIX BUILDS ONLY.
+ //#ifdef OS_UNIX
+ 
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "project.h"
+ 
+ /* The numer of max outstanding timers was once a const enum defined in em.h.
+@@ -1507,7 +1511,7 @@ int EventMachine_t::DetachFD (EventableD
+       if (Poller == Poller_Kqueue) {
+               // remove any read/write events for this fd
+               struct kevent k;
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) && __NetBSD_Version__ < 999001500
+               EV_SET (&k, ed->GetSocket(), EVFILT_READ | EVFILT_WRITE, EV_DELETE, 0, 0, (intptr_t)ed);
+ #else
+               EV_SET (&k, ed->GetSocket(), EVFILT_READ | EVFILT_WRITE, EV_DELETE, 0, 0, ed);
+@@ -1703,7 +1707,7 @@ void EventMachine_t::ArmKqueueWriter (Ev
+               if (!ed)
+                       throw std::runtime_error ("added bad descriptor");
+               struct kevent k;
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) && __NetBSD_Version__ < 999001500
+               EV_SET (&k, ed->GetSocket(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, (intptr_t)ed);
+ #else
+               EV_SET (&k, ed->GetSocket(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, ed);
+@@ -1731,7 +1735,7 @@ void EventMachine_t::ArmKqueueReader (Ev
+               if (!ed)
+                       throw std::runtime_error ("added bad descriptor");
+               struct kevent k;
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) && __NetBSD_Version__ < 999001500
+               EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, (intptr_t)ed);
+ #else
+               EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, ed);
+@@ -1788,7 +1792,7 @@ void EventMachine_t::_AddNewDescriptors(
+                       // INCOMPLETE. Some descriptors don't want to be readable.
+                       assert (kqfd != -1);
+                       struct kevent k;
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) && __NetBSD_Version__ < 999001500
+                       EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, (intptr_t)ed);
+ #else
+                       EV_SET (&k, ed->GetSocket(), EVFILT_READ, EV_ADD, 0, 0, ed);



Home | Main Index | Thread Index | Old Index