public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [OBV/RFA] Fix compilation of ld/emultempl/spuelf.em  on systems where HAVE_MKSTEMP is not defined
@ 2010-11-05 15:37 Pierre Muller
  0 siblings, 0 replies; 15+ messages in thread
From: Pierre Muller @ 2010-11-05 15:37 UTC (permalink / raw)
  To: binutils

  mingw64 cross compilation gave me that error :

x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../src/ld  -I.
-I../../src/ld -I../bfd -I../../src/ld/../bfd -I../../src/ld/../include
-I./../intl  -gstabs+ -O0 -D__USE_MINGW_ACCESS -DENABLE_PLUGINS
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Wno-format –Werror -gstabs+ -O0
-D__USE_MINGW_ACCESS -MT eelf32_spu.o -MD -MP -MF .deps/eelf32_spu .Tpo -c
-o eelf32_spu.o \
          -DEMBEDSPU="\"`echo embedspu | sed 's/^ld-new$/ld/;s,y,y,'`\""
eelf32_spu.c
cc1: warnings being treated as errors
../../src/ld/emultempl/spuelf.em: In function ‘new_tmp_file’:
../../src/ld/emultempl/spuelf.em:358:3: error: passing argument 1 of ‘open’
from
 incompatible pointer type
/usr/x86_64-w64-mingw32/sys-root/mingw/include/io.h:340:15: note: expected
‘cons
t char *’ but argument is of type ‘char **’

  The patch below fixes that compilation failure.
Is this OK?

Pierre

2010-11-05  Pierre Muller  <muller@ics.u-strasbg.fr>

                * emultempl/spuelf.em (new_tmp_file): Fix wrong first
parameter.

Index: emultempl/spuelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/spuelf.em,v
retrieving revision 1.41
diff -u -p -r1.41 spuelf.em
--- emultempl/spuelf.em            10 Aug 2009 07:50:56 -0000         1.41
+++ emultempl/spuelf.em         5 Nov 2010 11:18:46 -0000
@@ -355,7 +355,7 @@ new_tmp_file (char **fname)
   *fname = mktemp (*fname);
   if (*fname == NULL)
     return -1;
-  fd = open (fname, O_RDWR | O_CREAT | O_EXCL, 0600);
+  fd = open (*fname, O_RDWR | O_CREAT | O_EXCL, 0600);
 #endif
   return fd;
 }

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-12-01 11:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <48683.3413750448$1288971470@news.gmane.org>
2010-11-05 17:21 ` [OBV/RFA] Fix compilation of ld/emultempl/spuelf.em on systems where HAVE_MKSTEMP is not defined Richard Sandiford
2010-12-09 11:11   ` Not in 2.21 sources... " Pierre Muller
2010-12-09 11:20     ` Tristan Gingold
2010-12-09 12:26       ` Pierre Muller
2010-12-10 10:45         ` Tristan Gingold
2011-11-22 15:26         ` [RFC] 2.22 release: Compilation failure for mingw32 target with --enable-targets=all Pierre Muller
2011-11-25 16:40           ` nick clifton
2011-11-25 17:02             ` Pedro Alves
2011-11-29 12:43               ` nick clifton
2011-11-29 12:53                 ` Alan Modra
2011-11-29 16:27                   ` nick clifton
2011-11-30 11:52                     ` Alan Modra
2011-12-01 11:39                       ` nick clifton
2011-11-26 11:18             ` JonY
2010-11-05 15:37 [OBV/RFA] Fix compilation of ld/emultempl/spuelf.em on systems where HAVE_MKSTEMP is not defined Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).