Skip to content

Instantly share code, notes, and snippets.

@Naoir
Created October 30, 2015 15:59
Show Gist options
  • Save Naoir/5b0023bc67d132f98308 to your computer and use it in GitHub Desktop.
Save Naoir/5b0023bc67d132f98308 to your computer and use it in GitHub Desktop.
perl-crypt-cc.patch
commit a3bb529844e17ae9118fefd1431cbf4ebfbc699d
Author: Marcel Denia <naoir@gmx.net>
Date: Fri Oct 30 14:29:20 2015 +0100
perl: Enable crypt() for all libc implementations
Signed-off-by: Marcel Denia <naoir@gmx.net>
diff --git a/lang/perl/Makefile b/lang/perl/Makefile
index abd327f..1a51f33 100644
--- a/lang/perl/Makefile
+++ b/lang/perl/Makefile
@@ -49,13 +49,14 @@ TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS))
ifdef CONFIG_PERL_THREADS
PERL_CONFIG_SUFFIX:=-mt
- # uclibc doesn't provide crypt_r(). Enable crypt() usage for glibc builds only
- ifdef CONFIG_USE_GLIBC
- CRYPT_R_PROTO:=REENTRANT_PROTO_B_CCS
- CRYPT:=define
- else
+ CRYPT_R_PROTO:=REENTRANT_PROTO_B_CCS
+ CRYPT:=define
+ CRYPT_R:=define
+
+ # uClibc doesn't provide crypt_r()
+ ifdef CONFIG_USE_UCLIBC
CRYPT_R_PROTO:=0
- CRYPT:=undef
+ CRYPT_R:=undef
endif
endif
@@ -125,6 +126,7 @@ define Build/Configure
-e 's!%%HOSTMINIPERL%%!$(HOST_PERL_PREFIX)/bin/perl!g' \
-e 's!%%CRYPT_R_PROTO%%!$(CRYPT_R_PROTO)!g' \
-e 's!%%CRYPT%%!$(CRYPT)!g' \
+ -e 's!%%CRYPT_R%%!$(CRYPT_R)!g' \
-e 's!%%HOSTGENERATE%%!$(HOST_PERL_PREFIX)/bin/generate_uudmap!g' \
files/config.sh-$(patsubst i386,i486,$(ARCH))$(PERL_CONFIG_SUFFIX).in \
> $(PKG_BUILD_DIR)/config.sh
diff --git a/lang/perl/files/config.sh-arm-mt.in b/lang/perl/files/config.sh-arm-mt.in
index 635b05e..b0e4455 100644
--- a/lang/perl/files/config.sh-arm-mt.in
+++ b/lang/perl/files/config.sh-arm-mt.in
@@ -137,7 +137,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-armeb-mt.in b/lang/perl/files/config.sh-armeb-mt.in
index 6dad0eb..081d93d 100644
--- a/lang/perl/files/config.sh-armeb-mt.in
+++ b/lang/perl/files/config.sh-armeb-mt.in
@@ -136,7 +136,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-avr32-mt.in b/lang/perl/files/config.sh-avr32-mt.in
index 7336b66..4435578 100644
--- a/lang/perl/files/config.sh-avr32-mt.in
+++ b/lang/perl/files/config.sh-avr32-mt.in
@@ -139,7 +139,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-i486-mt.in b/lang/perl/files/config.sh-i486-mt.in
index 89583b6..63fc4a1 100644
--- a/lang/perl/files/config.sh-i486-mt.in
+++ b/lang/perl/files/config.sh-i486-mt.in
@@ -135,7 +135,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-mips-mt.in b/lang/perl/files/config.sh-mips-mt.in
index 8564c23..7a592ed 100644
--- a/lang/perl/files/config.sh-mips-mt.in
+++ b/lang/perl/files/config.sh-mips-mt.in
@@ -137,7 +137,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-mips64-mt.in b/lang/perl/files/config.sh-mips64-mt.in
index 26d908a..02f9fac 100644
--- a/lang/perl/files/config.sh-mips64-mt.in
+++ b/lang/perl/files/config.sh-mips64-mt.in
@@ -137,7 +137,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-mipsel-mt.in b/lang/perl/files/config.sh-mipsel-mt.in
index d09586a..f2cc422 100644
--- a/lang/perl/files/config.sh-mipsel-mt.in
+++ b/lang/perl/files/config.sh-mipsel-mt.in
@@ -135,7 +135,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-powerpc-mt.in b/lang/perl/files/config.sh-powerpc-mt.in
index 564f27b..dfbb6d7 100644
--- a/lang/perl/files/config.sh-powerpc-mt.in
+++ b/lang/perl/files/config.sh-powerpc-mt.in
@@ -137,7 +137,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
diff --git a/lang/perl/files/config.sh-x86_64-mt.in b/lang/perl/files/config.sh-x86_64-mt.in
index 3c6ab7b..f664f12 100644
--- a/lang/perl/files/config.sh-x86_64-mt.in
+++ b/lang/perl/files/config.sh-x86_64-mt.in
@@ -135,7 +135,7 @@ d_const='define'
d_copysignl='undef'
d_cplusplus='undef'
d_crypt='%%CRYPT%%'
-d_crypt_r='%%CRYPT%%'
+d_crypt_r='%%CRYPT_R%%'
d_csh='undef'
d_ctermid='define'
d_ctermid_r='undef'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment