From 1cfa2a674757f6ee776436154d2b8d34fb2b1114 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Fri, 30 Oct 2015 15:18:22 +0000
Subject: busybox: fix non-portable invocation of mktemp

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47289
---
 .../busybox/patches/102-trylink_mktemp_fix.patch     | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 package/utils/busybox/patches/102-trylink_mktemp_fix.patch

(limited to 'package/utils/busybox')

diff --git a/package/utils/busybox/patches/102-trylink_mktemp_fix.patch b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
new file mode 100644
index 0000000000..ed1dcbb66f
--- /dev/null
+++ b/package/utils/busybox/patches/102-trylink_mktemp_fix.patch
@@ -0,0 +1,20 @@
+--- a/scripts/trylink
++++ b/scripts/trylink
+@@ -46,7 +46,7 @@ try() {
+ }
+ 
+ check_cc() {
+-    local tempname="$(mktemp)"
++    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
+     local r
+     echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c
+     # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :(
+@@ -61,7 +61,7 @@ check_cc() {
+ }
+ 
+ check_libc_is_glibc() {
+-    local tempname="$(mktemp)"
++    local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
+     local r
+     echo "\
+ 	#include <stdlib.h>
-- 
cgit v1.2.3