The following commit has been merged in the master branch:
commit 554e3535cc45aa9ac0ac75cc0da66c845148b6f1
Author: Romain Beauxis <to...@rastageeks.org>
Date:   Thu Oct 20 14:36:49 2011 +0200

    Added patch to fix FTBFS on hurd.

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..845ca06
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.pc
diff --git a/debian/changelog b/debian/changelog
index b34f2c0..9c03844 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ocaml-bjack (0.1.3-4) experimental; urgency=low
+
+  * Added patch to avoid FTBFS on hurd caused by conflicts
+    over errno variable name. Thanks to Pino Toscano for 
+    reporting and patching.
+  Closes: #623337 
+  * Bumped standards-version to 3.9.2
+
+ -- Romain Beauxis <to...@rastageeks.org>  Thu, 20 Oct 2011 14:34:51 +0200
+
 ocaml-bjack (0.1.3-3) experimental; urgency=low
 
   [ St├ęphane Glondu ]
diff --git a/debian/control b/debian/control
index 113adcb..92e16ac 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Build-Depends:
  libsamplerate0-dev,
  ocaml-findlib,
  pkg-config,
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
 Homepage: http://savonet.sourceforge.net/
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocaml-bjack.git
 Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml-bjack.git
diff --git a/debian/control.in b/debian/control.in
index 65f42d1..0fda0b3 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -12,7 +12,7 @@ Build-Depends:
  libsamplerate0-dev,
  ocaml-findlib,
  pkg-config,
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
 Homepage: http://savonet.sourceforge.net/
 Vcs-Svn: 
svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/ocaml-bjack/trunk
 Vcs-Browser: 
http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocaml-bjack/trunk/
diff --git a/debian/patches/errnum.patch b/debian/patches/errnum.patch
new file mode 100644
index 0000000..f4ea327
--- /dev/null
+++ b/debian/patches/errnum.patch
@@ -0,0 +1,46 @@
+using errno causes troubles when compiling on hurd.
+See #623337
+
+--- a/src/jack_stubs.c
++++ b/src/jack_stubs.c
+@@ -50,9 +50,9 @@
+ #include <caml/memory.h>
+ #include <caml/signals.h>
+ 
+-static value caml_bjack_handle_error(int errno)
++static value caml_bjack_handle_error(int errnum)
+ {
+-  switch (errno)
++  switch (errnum)
+     {
+     case ERR_OPENING_JACK:
+       caml_raise_constant(*caml_named_value("bio2jack_exn_open"));
+@@ -146,12 +146,12 @@
+   int jack_ports_flags = Int_val(_jack_port_flags);
+ 
+ 
+-  int errno = 
JACK_Open(drv,Int_val(bit_per_sample),&r,String_val(name),String_val(server),
++  int errnum = 
JACK_Open(drv,Int_val(bit_per_sample),&r,String_val(name),String_val(server),
+                           Int_val(input_channels),Int_val(output_channels),
+                           jack_ports_flags, Int_val(size));
+ 
+-  if (errno != ERR_SUCCESS)
+-    caml_bjack_handle_error(errno) ;
++  if (errnum != ERR_SUCCESS)
++    caml_bjack_handle_error(errnum) ;
+ 
+   driver = caml_alloc_custom(&bjack_drv_ops, sizeof(jack_driver_t*), 1, 0);
+   Bjack_drv_val(driver) = drv;
+@@ -168,9 +168,9 @@
+ {
+   CAMLparam1(device);
+   jack_driver_t *drv = Bjack_drv_val(device);
+-  int errno = JACK_Close(drv);
+-  if (errno != ERR_SUCCESS)
+-    caml_bjack_handle_error(errno) ;
++  int errnum = JACK_Close(drv);
++  if (errnum != ERR_SUCCESS)
++    caml_bjack_handle_error(errnum) ;
+   CAMLreturn(Val_unit);
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6caadb4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+errnum.patch
diff --git a/src/jack_stubs.c b/src/jack_stubs.c
index 02f11d2..b4a3514 100644
--- a/src/jack_stubs.c
+++ b/src/jack_stubs.c
@@ -50,9 +50,9 @@
 #include <caml/memory.h>
 #include <caml/signals.h>
 
-static value caml_bjack_handle_error(int errno)
+static value caml_bjack_handle_error(int errnum)
 {
-  switch (errno)
+  switch (errnum)
     {
     case ERR_OPENING_JACK:
       caml_raise_constant(*caml_named_value("bio2jack_exn_open"));
@@ -146,12 +146,12 @@ CAMLprim value caml_bjack_open(value bit_per_sample, 
value rate,
   int jack_ports_flags = Int_val(_jack_port_flags);
 
 
-  int errno = 
JACK_Open(drv,Int_val(bit_per_sample),&r,String_val(name),String_val(server),
+  int errnum = 
JACK_Open(drv,Int_val(bit_per_sample),&r,String_val(name),String_val(server),
                           Int_val(input_channels),Int_val(output_channels),
                           jack_ports_flags, Int_val(size));
 
-  if (errno != ERR_SUCCESS)
-    caml_bjack_handle_error(errno) ;
+  if (errnum != ERR_SUCCESS)
+    caml_bjack_handle_error(errnum) ;
 
   driver = caml_alloc_custom(&bjack_drv_ops, sizeof(jack_driver_t*), 1, 0);
   Bjack_drv_val(driver) = drv;
@@ -168,9 +168,9 @@ CAMLprim value caml_bjack_close(value device)
 {
   CAMLparam1(device);
   jack_driver_t *drv = Bjack_drv_val(device);
-  int errno = JACK_Close(drv);
-  if (errno != ERR_SUCCESS)
-    caml_bjack_handle_error(errno) ;
+  int errnum = JACK_Close(drv);
+  if (errnum != ERR_SUCCESS)
+    caml_bjack_handle_error(errnum) ;
   CAMLreturn(Val_unit);
 }
 

-- 
ocaml-bjack packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to