diff options
author | christos <christos> | 2013-05-23 15:01:05 +0000 |
---|---|---|
committer | christos <christos> | 2013-05-23 15:01:05 +0000 |
commit | 9f4a9c44931af96d2643c179b27ad4fee4887d9a (patch) | |
tree | 6e4a3bd8dfb65fae21faddf137fd701ebbb93632 /net | |
parent | b3ead314727d2ff8ea2db2dbee03786d1eab6030 (diff) | |
download | pkgsrc-9f4a9c44931af96d2643c179b27ad4fee4887d9a.tar.gz |
remove obsolete libevent interface uses
Diffstat (limited to 'net')
-rw-r--r-- | net/unworkable/Makefile | 4 | ||||
-rw-r--r-- | net/unworkable/distinfo | 3 | ||||
-rw-r--r-- | net/unworkable/patches/patch-main.c | 61 |
3 files changed, 65 insertions, 3 deletions
diff --git a/net/unworkable/Makefile b/net/unworkable/Makefile index 23620d73005..793e40da799 100644 --- a/net/unworkable/Makefile +++ b/net/unworkable/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.10 2013/02/06 23:23:26 jperkin Exp $ +# $NetBSD: Makefile,v 1.11 2013/05/23 15:01:05 christos Exp $ DISTNAME= unworkable-0.51 -PKGREVISION= 6 +PKGREVISION= 7 CATEGORIES= net MASTER_SITES= # http://p2presearch.com/unworkable/dist/ diff --git a/net/unworkable/distinfo b/net/unworkable/distinfo index 7c31669ff09..39db82e6f99 100644 --- a/net/unworkable/distinfo +++ b/net/unworkable/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2009/01/19 05:40:39 agc Exp $ +$NetBSD: distinfo,v 1.2 2013/05/23 15:01:05 christos Exp $ SHA1 (unworkable-0.51.tar.gz) = 0a179f7d84aa95df3fe30bd49806776826f8e4c6 RMD160 (unworkable-0.51.tar.gz) = 72174941df30ab63101f334f0a657e1357f7309b Size (unworkable-0.51.tar.gz) = 71020 bytes SHA1 (patch-aa) = c792177339cf79341c24cf9a12032ee98d564eaa +SHA1 (patch-main.c) = d25ddad279f8143c4f15733f86c12f1074e43f0e diff --git a/net/unworkable/patches/patch-main.c b/net/unworkable/patches/patch-main.c new file mode 100644 index 00000000000..3c364b8dc27 --- /dev/null +++ b/net/unworkable/patches/patch-main.c @@ -0,0 +1,61 @@ +$NetBSD: patch-main.c,v 1.1 2013/05/23 15:01:05 christos Exp $ +Replace event_gotsig and event_sigcb with proper signal access + +--- main.c.orig 2008-09-27 16:35:43.000000000 -0400 ++++ main.c 2013-05-23 10:58:29.000000000 -0400 +@@ -40,13 +40,11 @@ + #define MESSAGE "hash check" + #define METER "|/-\\" + +-static void sighandler(int); ++static void addhandler(int); + void usage(void); + + extern char *optarg; + extern int optind; +-extern int event_gotsig; +-extern int (*event_sigcb)(void); + + void + usage(void) +@@ -56,9 +54,14 @@ + } + + static void +-sighandler(int sig) ++addhandler(int sig) + { +- event_gotsig = 1; ++ struct event sig_ev; ++ int got; ++ ++ evsignal_set(&sig_ev, sig, ++ (void (*)(evutil_socket_t, short, void *))terminate_handler, &got); ++ evsignal_add(&sig_ev, NULL); + } + + int +@@ -76,10 +79,10 @@ + GC_INIT(); + #endif + +- signal(SIGHUP, sighandler); +- signal(SIGABRT, sighandler); +- signal(SIGINT, sighandler); +- signal(SIGQUIT, sighandler); ++ addhandler(SIGHUP); ++ addhandler(SIGABRT); ++ addhandler(SIGINT); ++ addhandler(SIGQUIT); + /* don't die on sigpipe */ + signal(SIGPIPE, SIG_IGN); + #if defined(__SVR4) && defined(__sun) +@@ -160,7 +163,7 @@ + + srandom(time(NULL)); + network_init(); +- event_sigcb = terminate_handler; ++ + network_start_torrent(torrent, rlp.rlim_cur); + + exit(0); |