The following commit has been merged in the master branch:
commit 40a86eea0ee65c2fe2db591e49b0af64e597f7de
Author: Mehdi Dogguy <me...@debian.org>
Date:   Wed Jun 6 11:19:06 2012 +0200

    Fix FTBFS on kfreebsd-*
    
    - add 0002-Define-O_CLOEXEC-when-missing.patch

diff --git a/debian/changelog b/debian/changelog
index 330b1bd..07aab10 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ocaml-extunix (0.0.4-2) UNRELEASED; urgency=low
+
+  * Fix FTBFS on kfreebsd-*
+    - add 0002-Define-O_CLOEXEC-when-missing.patch
+
+ -- Mehdi Dogguy <me...@debian.org>  Wed, 06 Jun 2012 11:18:35 +0200
+
 ocaml-extunix (0.0.4-1) unstable; urgency=low
 
   * Team upload.
diff --git a/debian/patches/0002-Define-O_CLOEXEC-when-missing.patch 
b/debian/patches/0002-Define-O_CLOEXEC-when-missing.patch
new file mode 100644
index 0000000..3561dc8
--- /dev/null
+++ b/debian/patches/0002-Define-O_CLOEXEC-when-missing.patch
@@ -0,0 +1,27 @@
+From: Mehdi Dogguy <me...@debian.org>
+Date: Wed, 6 Jun 2012 11:15:32 +0200
+Subject: Define O_CLOEXEC when missing
+
+O_CLOEXEC is not defined on kfreebsd (yet).
+
+See http://bugs.debian.org/635192
+---
+ src/stdlib.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/stdlib.c b/src/stdlib.c
+index f79566f..b498ce4 100644
+--- a/src/stdlib.c
++++ b/src/stdlib.c
+@@ -142,6 +142,10 @@ CAMLprim value caml_extunix_internal_mkstemps(value 
v_template, value v_suffixle
+ /* FIXME: also in atfile.c, move to common file */
+ #include <fcntl.h>
+ 
++#ifndef O_CLOEXEC
++# define O_CLOEXEC 0
++#endif
++
+ static int open_flag_table[] = {
+   O_RDONLY, O_WRONLY, O_RDWR, O_NONBLOCK, O_APPEND, O_CREAT, O_TRUNC, O_EXCL,
+   O_NOCTTY, O_DSYNC, O_SYNC, O_RSYNC
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 9d3591a..9399e9d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Add-possibility-to-disable-execinfo-test-through-env.patch
+0002-Define-O_CLOEXEC-when-missing.patch

-- 
ocaml-extunix 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