[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH xennet] Fix build with later WDKs



From: Owen Smith <owen.smith@xxxxxxxxxx>

- Adds alias for GetProjectInfoForReference target to version.vcxproj
    Later kits seemed to have renamed the build target, and will fail without
    this alias target.
- Adds "/fd sha256" to signtool command line
    WDK 20344 and later require binaries signed with a SHA256 file digest, or
    the build outputs are deleted

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

- Squash warnings 4061 and 4062 as they lead to a lot of bogus noise.
- Add a somewhat pointless ASSERT for a condition that has already been
  tested to stop the compiler complaining.

Signed-off-by: Paul Durrant <paul@xxxxxxx>
---
 src/xennet/transmitter.c                   | 1 +
 vs2019/package/package.vcxproj             | 5 +++++
 vs2019/version/version.vcxproj             | 6 ++++++
 vs2019/xennet/xennet.vcxproj               | 5 ++++-
 vs2019/xennet_coinst/xennet_coinst.vcxproj | 3 +++
 5 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/xennet/transmitter.c b/src/xennet/transmitter.c
index 334bbb947de3..17d312aff89d 100644
--- a/src/xennet/transmitter.c
+++ b/src/xennet/transmitter.c
@@ -324,6 +324,7 @@ __TransmitterSendNetBufferList(
         __TransmitterGetNetBufferList(Transmitter, NetBufferList);
 
         if (NET_BUFFER_CURRENT_MDL(NetBuffer) != NULL) {
+            ASSERT(NetBuffer != NULL);
             status = XENVIF_VIF(TransmitterQueuePacket,
                                 AdapterGetVifInterface(Transmitter->Adapter),
                                 NET_BUFFER_CURRENT_MDL(NetBuffer),
diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj
index dd794b5fef41..1a439ee6288d 100644
--- a/vs2019/package/package.vcxproj
+++ b/vs2019/package/package.vcxproj
@@ -31,6 +31,11 @@
     <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
     <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
   </PropertyGroup>
+  <ItemDefinitionGroup>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
+  </ItemDefinitionGroup>
   <PropertyGroup Condition="'$(Platform)'=='Win32'">
     <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
   </PropertyGroup>
diff --git a/vs2019/version/version.vcxproj b/vs2019/version/version.vcxproj
index 9d149d0f10dd..b6ec6f3ecb0c 100644
--- a/vs2019/version/version.vcxproj
+++ b/vs2019/version/version.vcxproj
@@ -13,4 +13,10 @@
   <Target Name="Build">
     <Exec Command="powershell.exe -ExecutionPolicy Bypass -NoProfile 
-NonInteractive -File $(Script) $(Platform) $(SolutionDir) $(IncludeDir) 
$(SourceDir)" />
   </Target>
+  <Target Name="GetProjectInfoForReference"
+          Returns="@(ProjectInfoForReference)">
+    <ItemGroup>
+      <ProjectInfoForReference Include="@(LibFullPath)" />
+    </ItemGroup>
+  </Target>
 </Project>
diff --git a/vs2019/xennet/xennet.vcxproj b/vs2019/xennet/xennet.vcxproj
index 027dc4a0b709..abe9853fd2f5 100644
--- a/vs2019/xennet/xennet.vcxproj
+++ b/vs2019/xennet/xennet.vcxproj
@@ -26,7 +26,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       
<AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;</AdditionalIncludeDirectories>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28160;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4062;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28160;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
@@ -38,6 +38,9 @@
       
<AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xennet_coinst/xennet_coinst.vcxproj 
b/vs2019/xennet_coinst/xennet_coinst.vcxproj
index a159abdf178e..d2c5d07ac53a 100644
--- a/vs2019/xennet_coinst/xennet_coinst.vcxproj
+++ b/vs2019/xennet_coinst/xennet_coinst.vcxproj
@@ -32,6 +32,9 @@
       
<ModuleDefinitionFile>../../src/coinst/xennet_coinst.def</ModuleDefinitionFile>
       
<AdditionalDependencies>setupapi.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.