From 654bd20277c365445768bc4569899d189d58b5cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?=
 <agentzh@gmail.com>
Date: Fri, 17 Aug 2012 16:10:35 -0700
Subject: [PATCH] updated the dtrace patches for nginx 1.2.3 and 1.3.4 for
 FreeBSD. also updated the bundling scripts to make them work on FreeBSD.

---
 patches/nginx-1.2.3-dtrace.patch | 4 ++--
 patches/nginx-1.3.4-dtrace.patch | 2 +-
 util/get-tarball                 | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/patches/nginx-1.2.3-dtrace.patch b/patches/nginx-1.2.3-dtrace.patch
index 110327b..46147b6 100644
--- a/patches/nginx-1.2.3-dtrace.patch
+++ b/patches/nginx-1.2.3-dtrace.patch
@@ -610,7 +610,7 @@ index 3e077fb..b7edb7b 100644
                  return NGX_CONF_ERROR;
              }
 diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
-index c5db18f..f23ba51 100644
+index c5db18f..ffc7049 100644
 --- a/src/http/ngx_http_core_module.c
 +++ b/src/http/ngx_http_core_module.c
 @@ -8,6 +8,7 @@
@@ -625,7 +625,7 @@ index c5db18f..f23ba51 100644
      r->main->subrequests--;
  
      if (r->main->subrequests == 0) {
-+        ngx_http_probe_subrequest_cycle(r, &uri, &args);
++        ngx_http_probe_subrequest_cycle(r, uri, args);
 +
          ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                        "subrequests cycle while processing \"%V\"", uri);
diff --git a/patches/nginx-1.3.4-dtrace.patch b/patches/nginx-1.3.4-dtrace.patch
index 110327b..88ca467 100644
--- a/patches/nginx-1.3.4-dtrace.patch
+++ b/patches/nginx-1.3.4-dtrace.patch
@@ -625,7 +625,7 @@ index c5db18f..f23ba51 100644
      r->main->subrequests--;
  
      if (r->main->subrequests == 0) {
-+        ngx_http_probe_subrequest_cycle(r, &uri, &args);
++        ngx_http_probe_subrequest_cycle(r, uri, args);
 +
          ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                        "subrequests cycle while processing \"%V\"", uri);
diff --git a/util/get-tarball b/util/get-tarball
index 6464863..0e6d6a8 100755
--- a/util/get-tarball
+++ b/util/get-tarball
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 #root=$(readlink -f -- "$(dirname -- "$0")/..")
 root=`perl -MCwd -e'print Cwd::abs_path(shift)' $(dirname -- "$0")/..`