SF.net SVN: gar:[23494] csw/mgar/pkg/tor/branches/alpha

jake_goerzen at users.sourceforge.net jake_goerzen at users.sourceforge.net
Thu Apr 24 20:19:06 CEST 2014


Revision: 23494
          http://sourceforge.net/p/gar/code/23494
Author:   jake_goerzen
Date:     2014-04-24 18:19:04 +0000 (Thu, 24 Apr 2014)
Log Message:
-----------
tor/branches/alpha: add patches to fix compiling on Solaris

Modified Paths:
--------------
    csw/mgar/pkg/tor/branches/alpha/Makefile

Added Paths:
-----------
    csw/mgar/pkg/tor/branches/alpha/files/0001-add-test-to-detech-we-are-on-Solaris.patch
    csw/mgar/pkg/tor/branches/alpha/files/fixes_bug11426.patch

Modified: csw/mgar/pkg/tor/branches/alpha/Makefile
===================================================================
--- csw/mgar/pkg/tor/branches/alpha/Makefile	2014-04-24 17:36:31 UTC (rev 23493)
+++ csw/mgar/pkg/tor/branches/alpha/Makefile	2014-04-24 18:19:04 UTC (rev 23494)
@@ -8,9 +8,16 @@
 Basically tor provides a distributed network of servers (onion routers). Users bounce their TCP streams (web traffic, ftp, ssh, etc) around the routers, and recipients, observers, and even the routers themselves have difficulty tracking the source of the stream.
 endef
 
+# This is where the source git repo is located but we are building from the
+# official alpha release tar.gz distibution downloaded from MATER_SITES.
+# GIT_REPOS = git://git.torproject.org/tor.git
+
 MASTER_SITES = http://www.torproject.org/dist/
 DISTFILES  = $(DISTNAME).tar.gz
 
+PATCHFILES += fixes_bug11426.patch
+PATCHFILES += 0001-add-test-to-detech-we-are-on-Solaris.patch
+
 # File name regex to get notifications about upstream software releases
 UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
 

Added: csw/mgar/pkg/tor/branches/alpha/files/0001-add-test-to-detech-we-are-on-Solaris.patch
===================================================================
--- csw/mgar/pkg/tor/branches/alpha/files/0001-add-test-to-detech-we-are-on-Solaris.patch	                        (rev 0)
+++ csw/mgar/pkg/tor/branches/alpha/files/0001-add-test-to-detech-we-are-on-Solaris.patch	2014-04-24 18:19:04 UTC (rev 23494)
@@ -0,0 +1,28 @@
+From 12209beaed0135b2bf11669cfc7ea27c2b36094f Mon Sep 17 00:00:00 2001
+From: Jake Goerzen <jgoerzen at opencsw.org>
+Date: Thu, 24 Apr 2014 18:57:38 +0200
+Subject: [PATCH] add test to detech we are on Solaris
+
+---
+ src/test/test_bt_cl.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
+index 45ae82f..7352e9e 100644
+--- a/src/test/test_bt_cl.c
++++ b/src/test/test_bt_cl.c
+@@ -20,6 +20,11 @@ static int crashtype = 0;
+ #define NORETURN __attribute__((noreturn))
+ #endif
+ 
++#if defined(__sun) && defined(__SVR4)
++#define NOINLINE __attribute__((noinline))
++#define NORETURN __attribute__((noreturn))
++#endif
++
+ int crash(int x) NOINLINE;
+ int oh_what(int x) NOINLINE;
+ int a_tangled_web(int x) NOINLINE;
+-- 
+1.8.4.1
+

Added: csw/mgar/pkg/tor/branches/alpha/files/fixes_bug11426.patch
===================================================================
--- csw/mgar/pkg/tor/branches/alpha/files/fixes_bug11426.patch	                        (rev 0)
+++ csw/mgar/pkg/tor/branches/alpha/files/fixes_bug11426.patch	2014-04-24 18:19:04 UTC (rev 23494)
@@ -0,0 +1,41 @@
+From 9ccedbece0052cf743d5e5703e1676cda6cab733 Mon Sep 17 00:00:00 2001
+From: Nick Mathewson <nickm at torproject.org>
+Date: Mon, 7 Apr 2014 13:07:14 -0400
+Subject: [PATCH 1/1] Make csiphash use the proper endian-converter on solaris
+
+fixes bug 11426; bugfix on 0.2.5.3-alpha, where csiphash was
+introduced.
+---
+ changes/bug11426   |    3 +++
+ src/ext/csiphash.c |    4 ++++
+ 2 files changed, 7 insertions(+)
+ create mode 100644 changes/bug11426
+
+diff --git a/changes/bug11426 b/changes/bug11426
+new file mode 100644
+index 0000000..23b1e7d
+--- /dev/null
++++ b/changes/bug11426
+@@ -0,0 +1,3 @@
++  o Minor bugfixes:
++    - Fix compilation on Solaris, which does not have <endian.h>.
++      Fixes bug 11426; bugfix on 0.2.5.3-alpha.
+diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
+index 2a96f28..c247886 100644
+--- a/src/ext/csiphash.c
++++ b/src/ext/csiphash.c
+@@ -46,6 +46,10 @@
+ #elif defined(__APPLE__)
+ #  include <libkern/OSByteOrder.h>
+ #  define _le64toh(x) OSSwapLittleToHostInt64(x)
++#elif defined(sun) || defined(__sun)
++#  include <sys/byteorder.h>
++#  define _le64toh(x) LE_64(x)
++
+ #else
+ 
+ /* See: http://sourceforge.net/p/predef/wiki/Endianness/ */
+-- 
+1.7.10.4
+
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list