[21/25] libasm: stdio_ext.h are not present on win32

Message ID 20221020182603.815-22-luoyonggang@gmail.com
State New
Headers
Series Patches for building with mingw/gcc msvc/clang-cl |

Commit Message

Yonggang Luo Oct. 20, 2022, 6:26 p.m. UTC
  Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 libasm/asm_begin.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c
index 9e4dfe43..9b6d974e 100644
--- a/libasm/asm_begin.c
+++ b/libasm/asm_begin.c
@@ -34,10 +34,13 @@ 
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
-#include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
 
+#if !defined(_WIN32)
+#include <stdio_ext.h>
+#endif
+
 #include <gelf.h>
 #include "libasmP.h"
 
@@ -56,8 +59,10 @@  prepare_text_output (AsmCtx_t *result)
 	  free (result);
 	  result = NULL;
 	}
+#if !defined(_WIN32)
       else
 	__fsetlocking (result->out.file, FSETLOCKING_BYCALLER);
+#endif
     }
 
   return result;