summary refs log tree commit diff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2021-09-14 21:39:05 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2021-09-14 21:39:05 +0200
commit4dbebca113d40f6679652a0f8410556c12ff04a3 (patch)
tree89b1ceda45867a71d04166f7f63191be6b380c13 /gnu/packages/java.scm
parent1fec7c43f8d8e00ad729f6666456d44a3e5e1c74 (diff)
downloadguix-4dbebca113d40f6679652a0f8410556c12ff04a3.tar.gz
gnu: icedtea: Fix build.
* gnu/packages/java.scm (icedtea-8)[arguments]: Pass '-fcommon' to CFLAGS and
  CXXFLAGS. Add 'fix-openjdk' phase.
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 03941ba460..a5ea44ba5b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1793,7 +1793,9 @@ IcedTea build harness.")
                 (srfi srfi-26)))
              ((#:configure-flags flags)
               `(let ((jdk (assoc-ref %build-inputs "jdk")))
-                 `( ;;"--disable-bootstrap"
+                 `("CFLAGS=-fcommon"
+                   "CXXFLAGS=-fcommon"
+                   ;;"--disable-bootstrap"
                    "--enable-bootstrap"
                    "--enable-nss"
                    ,(string-append "--with-parallel-jobs="
@@ -1858,6 +1860,13 @@ new Date();"))
                         (find-files "openjdk.src/jdk/src/solaris/native"
                                     "\\.c|\\.h"))
                        #t)))
+                 (replace 'fix-openjdk
+                   (lambda _
+                     (substitute*
+                         '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+                           "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+                       (("#include <sys/sysctl.h>")
+                        "#include <linux/sysctl.h>"))))
                  (replace 'install
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let ((doc (string-append (assoc-ref outputs "doc")