git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] msvc: Fix compilation error due to missing mktemp() declaration

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jan 1, 2011, 20:31 UTC
Message-ID
<4D1F8F06.9090700@ramsay1.demon.co.uk>

Commit d1b6e6e (win32: use our own dirent.h, 2010-11-23) removed the compat/vcbuild/include/dirent.h compatibility header file. This file, among other things, included the <io.h> system header file which provides the declaration of the mktemp() function.

In order to fix the compilation error, we add an include directive for <io.h> to the compat/mingw.h header.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Change from v1:
    - add #include to compat/mingw.h rather than compat/vcbuild/include/unistd.h

ATB, Ramsay Jones

 compat/mingw.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h
index cafc1eb..1c6bc02 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -1,5 +1,6 @@
 #include <winsock2.h>
 #include <ws2tcpip.h>
+#include <io.h>
 
 /*
  * things that are not available in header files
-- 
1.7.3
Next: Ramsay Jones
Message 1 of 3 in “msvc: Fix compilation error due to missing mktemp() declaration”
  1. msvc: Fix compilation error due to missing mktemp() declarationRamsay Jones, Jan 1, 2011
  2. Ramsay JonesJan 11, 2011
  3. Junio C HamanoJan 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.