libressl-portable/patches/tls_util.c.patch

26 lines
587 B
Diff

--- tls/tls_util.c.orig Fri Jul 26 22:17:04 2019
+++ tls/tls_util.c Fri Jul 26 22:21:22 2019
@@ -17,6 +17,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef _MSC_VER
+#define NO_REDEF_POSIX_FUNCTIONS
+#endif
+
#include <sys/stat.h>
#include <stdlib.h>
@@ -161,7 +165,11 @@ tls_load_file(const char *name, size_t *len, char *pas
*len = 0;
+#ifndef _WIN32
if ((fd = open(name, O_RDONLY)) == -1)
+#else
+ if ((fd = open(name, O_RDONLY | O_BINARY)) == -1)
+#endif
return (NULL);
/* Just load the file into memory without decryption */