summaryrefslogtreecommitdiff
path: root/security/mbedtls
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-06-02 15:07:59 +0000
committernia <nia@pkgsrc.org>2020-06-02 15:07:59 +0000
commit2712c82386a3b8c9b4e44388881354bed6e42975 (patch)
tree3983cd9e720f33fa30627009390b050fdacfee84 /security/mbedtls
parent11660b07b0070bfe5c386b2b6e8a70542a98ffa4 (diff)
downloadpkgsrc-2712c82386a3b8c9b4e44388881354bed6e42975.tar.gz
mbedtls: attempt to fix build on SunOS
Diffstat (limited to 'security/mbedtls')
-rw-r--r--security/mbedtls/distinfo4
-rw-r--r--security/mbedtls/patches/patch-programs_aes_aescrypt2.c16
-rw-r--r--security/mbedtls/patches/patch-programs_aes_crypt__and__hash.c16
3 files changed, 35 insertions, 1 deletions
diff --git a/security/mbedtls/distinfo b/security/mbedtls/distinfo
index c9ec8ca0cde..ada4b07d3ac 100644
--- a/security/mbedtls/distinfo
+++ b/security/mbedtls/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.9 2020/04/18 14:21:56 nia Exp $
+$NetBSD: distinfo,v 1.10 2020/06/02 15:07:59 nia Exp $
SHA1 (mbedtls-2.16.6-apache.tgz) = 3cb5b681597a5bd798d31038c129c0dc911d8a2c
RMD160 (mbedtls-2.16.6-apache.tgz) = da5ede944292874afdb24a8fe21c643b34255206
SHA512 (mbedtls-2.16.6-apache.tgz) = a0c48b694d7bc70256d26c44bfb2ac802428560b02e50fe2e47762bc595e2c7b8fac934badb3452acb01d8a54386eafae0ff2894320d24ab7554f1c8e6cb4bcf
Size (mbedtls-2.16.6-apache.tgz) = 2699220 bytes
SHA1 (patch-library_net__sockets.c) = cd8f9cf84947800eb73d004847789626511ceb35
+SHA1 (patch-programs_aes_aescrypt2.c) = 216cc7cb0b5530897ea5ca194128b8928def5f16
+SHA1 (patch-programs_aes_crypt__and__hash.c) = 3c2d72abf89d5e29d434abb6d745c0d086496556
diff --git a/security/mbedtls/patches/patch-programs_aes_aescrypt2.c b/security/mbedtls/patches/patch-programs_aes_aescrypt2.c
new file mode 100644
index 00000000000..be6ca7d754d
--- /dev/null
+++ b/security/mbedtls/patches/patch-programs_aes_aescrypt2.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-programs_aes_aescrypt2.c,v 1.1 2020/06/02 15:07:59 nia Exp $
+
+Not actually so harmless on SunOS, which requires at least 200112L
+when compiling c99.
+
+--- programs/aes/aescrypt2.c.orig 2020-04-09 13:12:23.000000000 +0000
++++ programs/aes/aescrypt2.c
+@@ -22,7 +22,7 @@
+ /* Enable definition of fileno() even when compiling with -std=c99. Must be
+ * set before config.h, which pulls in glibc's features.h indirectly.
+ * Harmless on other platforms. */
+-#define _POSIX_C_SOURCE 1
++#define _POSIX_C_SOURCE 200112L
+
+ #if !defined(MBEDTLS_CONFIG_FILE)
+ #include "mbedtls/config.h"
diff --git a/security/mbedtls/patches/patch-programs_aes_crypt__and__hash.c b/security/mbedtls/patches/patch-programs_aes_crypt__and__hash.c
new file mode 100644
index 00000000000..e8d5441b25a
--- /dev/null
+++ b/security/mbedtls/patches/patch-programs_aes_crypt__and__hash.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-programs_aes_crypt__and__hash.c,v 1.1 2020/06/02 15:07:59 nia Exp $
+
+Not actually so harmless on SunOS, which requires at least 200112L
+when compiling c99.
+
+--- programs/aes/crypt_and_hash.c.orig 2020-04-09 13:12:23.000000000 +0000
++++ programs/aes/crypt_and_hash.c
+@@ -23,7 +23,7 @@
+ /* Enable definition of fileno() even when compiling with -std=c99. Must be
+ * set before config.h, which pulls in glibc's features.h indirectly.
+ * Harmless on other platforms. */
+-#define _POSIX_C_SOURCE 1
++#define _POSIX_C_SOURCE 200112L
+
+ #if !defined(MBEDTLS_CONFIG_FILE)
+ #include "mbedtls/config.h"