]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid compilation warning on MinGW
authorEli Zaretskii <eliz@gnu.org>
Sat, 1 Oct 2016 07:12:53 +0000 (10:12 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 1 Oct 2016 07:12:53 +0000 (10:12 +0300)
* src/w32.c: Include string.h, needed for the prototype of
'strerror', shadowed by 'sys_strerror'.  This avoids a compiler
warning about "no previous prototype".  The string.h header
must be included after ms-w32.h, but before "#undef strerror".

src/w32.c

index e0a34060f0aa9fa0688bce843766f7e06d9d61e3..f9110853799f25a99730f6e64ad57f1b517e6121 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -40,9 +40,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/utime.h>
 #include <math.h>
 
-/* Include CRT headers *before* ms-w32.h.  */
+/* Include (most) CRT headers *before* ms-w32.h.  */
 #include <ms-w32.h>
 
+#include <string.h>    /* for strerror, needed by sys_strerror */
 #include <mbstring.h>  /* for _mbspbrk, _mbslwr, _mbsrchr, ... */
 
 #undef access