summary refs log tree commit diff
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-11-16 02:02:44 +0000
committerOrivej Desh <orivej@gmx.fr>2017-11-16 02:02:44 +0000
commit3835526a9479e6aa19e36bf045fc19ca2ad89002 (patch)
tree7bba7e435f2c6e439a72e89907e7c5e359965568
parent5018c27a3d3dd049b6b0adbb416e29bbdb835905 (diff)
downloadnixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.tar
nixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.tar.gz
nixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.tar.bz2
nixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.tar.lz
nixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.tar.xz
nixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.tar.zst
nixpkgs-3835526a9479e6aa19e36bf045fc19ca2ad89002.zip
libaal: fix build with glibc 2.26
I have extracted this patch by Jan Engelhardt from [1] because I have not found
any direct or persistent link to it.

[1] http://tube.opensuse.org/repositories/filesystems/SLE_11_SP4/src/libaal-1.0.6-107.1.src.rpm

Tracking issue: #31696
-rw-r--r--pkgs/development/libraries/libaal/default.nix4
-rw-r--r--pkgs/development/libraries/libaal/libaal-1.0.6-glibc-2.26.patch89
2 files changed, 93 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libaal/default.nix b/pkgs/development/libraries/libaal/default.nix
index 88396786ed7..6df7bc22772 100644
--- a/pkgs/development/libraries/libaal/default.nix
+++ b/pkgs/development/libraries/libaal/default.nix
@@ -9,10 +9,14 @@ stdenv.mkDerivation rec {
     sha256 = "176f2sns6iyxv3h9zyirdinjwi05gdak48zqarhib2s38rvm98di";
   };
 
+  patches = [ ./libaal-1.0.6-glibc-2.26.patch ];
+
   preInstall = ''
     substituteInPlace Makefile --replace ./run-ldconfig true
   '';
 
+  enableParallelBuilding = true;
+
   meta = {
     homepage = http://www.namesys.com/;
     description = "Support library for Reiser4";
diff --git a/pkgs/development/libraries/libaal/libaal-1.0.6-glibc-2.26.patch b/pkgs/development/libraries/libaal/libaal-1.0.6-glibc-2.26.patch
new file mode 100644
index 00000000000..6d49682f03a
--- /dev/null
+++ b/pkgs/development/libraries/libaal/libaal-1.0.6-glibc-2.26.patch
@@ -0,0 +1,89 @@
+Date: 2017-09-02 13:03:15.353403096 +0200
+From: Jan Engelhardt <jengelh@inai.de>
+
+Stop redefining libc definitions that cause build failures under glibc-2.26.
+
+[   46s] In file included from /usr/include/sys/types.h:156:0,
+[   46s]                  from /usr/include/stdlib.h:279,
+[   46s]                  from malloc.c:15:
+[   46s] /usr/include/bits/stdint-intn.h:27:19: error: conflicting types for 'int64_t'
+[   46s]  typedef __int64_t int64_t;
+[   46s]                    ^~~~~~~
+[   46s] In file included from ../include/aal/libaal.h:17:0,
+[   46s]                  from malloc.c:6:
+[   46s] ../include/aal/types.h:35:33: note: previous declaration of 'int64_t' was here
+[   46s]  typedef long long int           int64_t;
+
+
+---
+ include/aal/types.h |   48 ++----------------------------------------------
+ 1 file changed, 2 insertions(+), 46 deletions(-)
+
+Index: libaal-1.0.6/include/aal/types.h
+===================================================================
+--- libaal-1.0.6.orig/include/aal/types.h
++++ libaal-1.0.6/include/aal/types.h
+@@ -26,24 +26,7 @@
+ #undef ESTRUCT
+ #define ESTRUCT                 50
+ 
+-#ifndef __int8_t_defined
+-#define __int8_t_defined
+-typedef signed char             int8_t;
+-typedef short int               int16_t;
+-typedef int                     int32_t;
+-__extension__
+-typedef long long int           int64_t;
+-#endif
+- 
+-typedef unsigned char           uint8_t;
+-typedef unsigned short int      uint16_t;
+-#ifndef __uint32_t_defined
+-#define __uint32_t_defined
+-typedef unsigned int            uint32_t;
+-__extension__
+-typedef unsigned long long int  uint64_t;
+-#endif
+-
++#include <stdint.h>
+ #define MAX_UINT8  ((uint8_t)~0)
+ #define MAX_UINT16 ((uint16_t)~0)
+ #define MAX_UINT32 ((uint32_t)~0)
+@@ -53,36 +36,9 @@ typedef unsigned long long int  uint64_t
+    because we don't want use gcc builtins in minimal mode for achive as small
+    binary size as possible. */
+ 
+-#ifndef ENABLE_MINIMAL
+ #  include <stdarg.h>
+-#else
+-#ifndef _VA_LIST_
+-#define _VA_LIST_
+-typedef char *va_list;
+-#endif
+-#undef va_arg
+-#undef va_end
+-#undef va_start
+-
+-#define va_end(ap)       \
+-        do {} while(0);
+-
+-#define va_start(ap, p)  \
+-        (ap = (char *)(&(p)+1))
+-
+-#define va_arg(ap, type) \
+-        ((type *)(ap += sizeof(type)))[-1]
+-#endif
+-
+-/* As libaal may be used without any standard headers, we need to declare NULL
+-   macro here in order to avoid compilation errors. */
+-#undef NULL
+ 
+-#if defined(__cplusplus)
+-#  define NULL 0
+-#else
+-#  define NULL ((void *)0)
+-#endif
++#include <stdio.h>
+ 
+ /* Simple type for direction denoting */
+ enum aal_dir {