This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[OBV/RFA] Fix compilation of ld/emultempl/spuelf.em on systems where HAVE_MKSTEMP is not defined


? 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;
?}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]