Skip to content

Commit

Permalink
libfido: Restore removed patch
Browse files Browse the repository at this point in the history
Restore one of the patches removed in 676cb4e.

The restored patch is not yet included upstream:
https://github.com/Yubico/libfido2/blob/03c18d396eb209a42bbf62f5f4415203cba2fc50/CMakeLists.txt#L212-L214C2
  • Loading branch information
AlessandroBono committed Jun 26, 2024
1 parent 676cb4e commit 3cce506
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From c3c7343d3a18de2f00f288db4969ec07cb1fae09 Mon Sep 17 00:00:00 2001
From: Mofidul Jamal <mofidulj@amazon.com>
Date: Fri, 18 Aug 2023 14:11:21 -0400
Subject: [PATCH] libfido2: update cmake script to have /sdl flag before -W4
and warning disabled flags

---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6fa341a..e97976c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,9 +209,9 @@ if(MSVC)
string(REPLACE "C" " -wd" MSVC_DISABLED_WARNINGS_STR
${MSVC_DISABLED_WARNINGS_LIST})
string(REGEX REPLACE "[/-]W[1234][ ]?" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -MP -W4 -WX ${MSVC_DISABLED_WARNINGS_STR}")
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Od /Z7 /guard:cf /sdl /RTCcsu")
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi /guard:cf /sdl")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /sdl -MP -W4 -WX ${MSVC_DISABLED_WARNINGS_STR}")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Od /Z7 /guard:cf /RTCcsu")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi /guard:cf")
if(USE_WINHELLO)
add_definitions(-DUSE_WINHELLO)
endif()
--
2.37.1.windows.1

4 changes: 3 additions & 1 deletion gvsbuild/projects/libfido2.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def __init__(self):
"openssl",
"libcbor",
],
patches=[],
patches=[
"0001-libfido2-update-cmake-script-to-have-sdl-flag-before.patch",
],
)

def build(self):
Expand Down

0 comments on commit 3cce506

Please sign in to comment.