1
0

102-trylink_mktemp_fix.patch 537 B

1234567891011121314151617181920
  1. --- a/scripts/trylink
  2. +++ b/scripts/trylink
  3. @@ -46,7 +46,7 @@ try() {
  4. }
  5. check_cc() {
  6. - local tempname="$(mktemp)"
  7. + local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
  8. local r
  9. echo "int main(int argc,char**argv){return argv?argc:0;}" >"$tempname".c
  10. # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :(
  11. @@ -61,7 +61,7 @@ check_cc() {
  12. }
  13. check_libc_is_glibc() {
  14. - local tempname="$(mktemp)"
  15. + local tempname="$(mktemp /tmp/tmp.XXXXXXXXXX)"
  16. local r
  17. echo "\
  18. #include <stdlib.h>