about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/readline
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-04-22 21:15:06 +0000
committerAlyssa Ross <hi@alyssa.is>2019-04-22 21:18:23 +0000
commitb935ae5f3cfb2bb4f9a3746d284f156a6dece505 (patch)
tree5efe4e2e7a7723a737d0130a333b057c5e76df40 /nixpkgs/pkgs/development/libraries/readline
parentdc9566e91c9453378c24e98b5737234364670df5 (diff)
parentd26027792812fbfad4d0f451b5f47fdabf7fdeb9 (diff)
downloadnixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.tar
nixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.tar.gz
nixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.tar.bz2
nixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.tar.lz
nixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.tar.xz
nixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.tar.zst
nixlib-b935ae5f3cfb2bb4f9a3746d284f156a6dece505.zip
Merge commit 'd26027792812fbfad4d0f451b5f47fdabf7fdeb9'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/readline')
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/6.3.nix2
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/android.patch16
2 files changed, 17 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/readline/6.3.nix b/nixpkgs/pkgs/development/libraries/readline/6.3.nix
index cbe6c083cb44..f9a20a535cb3 100644
--- a/nixpkgs/pkgs/development/libraries/readline/6.3.nix
+++ b/nixpkgs/pkgs/development/libraries/readline/6.3.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   patches =
     [ ./link-against-ncurses.patch
       ./no-arch_only-6.3.patch
-    ]
+    ] ++ stdenv.lib.optional stdenv.hostPlatform.useAndroidPrebuilt ./android.patch
     ++
     (let
        patch = nr: sha256:
diff --git a/nixpkgs/pkgs/development/libraries/readline/android.patch b/nixpkgs/pkgs/development/libraries/readline/android.patch
new file mode 100644
index 000000000000..7e81774be369
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/android.patch
@@ -0,0 +1,16 @@
+diff --git histlib.h histlib.h
+index c938a10..925ab72 100644
+--- histlib.h
++++ histlib.h
+@@ -51,9 +51,9 @@
+ #endif
+ 
+ #ifndef member
+-#  ifndef strchr
++#  if !defined (strchr) && !defined (__STDC__)
+ extern char *strchr ();
+-#  endif
++#  endif /* !strchr && !__STDC__ */
+ #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0)
+ #endif
+