$OpenBSD: patch-binutils_resrc_c,v 1.1 2002/05/08 11:02:40 fgsch Exp $
--- binutils/resrc.c.orig	Wed May  8 04:07:21 2002
+++ binutils/resrc.c	Wed May  8 04:08:31 2002
@@ -185,7 +185,12 @@ run_cmd (cmd, redir)
   int i;
   const char **argv;
   char *errmsg_fmt, *errmsg_arg;
+#if defined(__MSDOS__) && !defined(__GO32__)
   char *temp_base = choose_temp_base ();
+#else
+  char *temp_base = NULL;
+#endif
+
   int in_quote;
   char sep;
   int redir_handle = -1;
@@ -297,12 +302,7 @@ open_input_stream (cmd)
 {
   if (istream_type == ISTREAM_FILE)
     {
-      char *fileprefix;
-
-      fileprefix = choose_temp_base ();
-      cpp_temp_file = (char *) xmalloc (strlen (fileprefix) + 5);
-      sprintf (cpp_temp_file, "%s.irc", fileprefix);
-      free (fileprefix);
+      cpp_temp_file = make_temp_file (".irc");
 
       if (run_cmd (cmd, cpp_temp_file))
 	fatal (_("can't execute `%s': %s"), cmd, strerror (errno));
