#include <windef.h>
#include <ks.h>
+/* Helper macro to enable gcc's extension. */
+#ifndef __GNU_EXTENSION
+#ifdef __GNUC__
+#define __GNU_EXTENSION __extension__
+#else
+#define __GNU_EXTENSION
+#endif
+#endif
+
#define STREAMAPI __stdcall
#define STREAM_SYSTEM_TIME_MASK ((STREAM_SYSTEM_TIME)0x00000001FFFFFFFF)
#endif
typedef PHYSICAL_ADDRESS STREAM_PHYSICAL_ADDRESS, *PSTREAM_PHYSICAL_ADDRESS;
-typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME;
-typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP;
+__GNU_EXTENSION typedef unsigned __int64 STREAM_SYSTEM_TIME, *PSTREAM_SYSTEM_TIME;
+__GNU_EXTENSION typedef unsigned __int64 STREAM_TIMESTAMP, *PSTREAM_TIMESTAMP;
typedef enum
{
BOOLEAN Enable;
PKSEVENT_ENTRY EventEntry;
PKSEVENTDATA EventData;
- union
+ __GNU_EXTENSION union
{
struct _HW_STREAM_OBJECT * StreamObject;
struct _HW_DEVICE_EXTENSION *DeviceExtension;
ULONG Flags;
PVOID HwInstanceExtension;
- union
+ __GNU_EXTENSION union
{
ULONG NumberOfBytesToTransfer;
ULONG ActualBytesTransferred;
typedef struct _HW_INITIALIZATION_DATA {
#if (NTDDI_VERSION >= NTDDI_WINXP)
- union
- {
+ __GNU_EXTENSION union
+ {
ULONG HwInitializationDataSize;
- struct
- {
+ __GNU_EXTENSION struct
+ {
USHORT SizeOfThisPacket;
USHORT StreamClassVersion;
};