[v5,1/2] eal/windows: make dirent.h shim compatible with MinGW

Message ID 1710262359-14217-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series eal: initialize shared plugins on Windows |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 12, 2024, 4:52 p.m. UTC
  Include winapifamily.h for WINAPI_FAMILY macro and provide a definition
of WINAPI_FAMILY_PHONE_APP if not present (happens compiling under
mingw)

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/include/dirent.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/lib/eal/windows/include/dirent.h b/lib/eal/windows/include/dirent.h
index b522424..80bc6c3 100644
--- a/lib/eal/windows/include/dirent.h
+++ b/lib/eal/windows/include/dirent.h
@@ -8,6 +8,12 @@ 
 #ifndef DIRENT_H
 #define DIRENT_H
 
+#include <winapifamily.h>
+
+#ifndef WINAPI_FAMILY_PHONE_APP
+#define WINAPI_FAMILY_PHONE_APP 3
+#endif
+
 /*
  * Include windows.h without Windows Sockets 1.1 to prevent conflicts with
  * Windows Sockets 2.0.