Skip to content

Commit abbca55

Browse files
committed
_MSC_VER specifics
2 parents 94c1812 + deb5543 commit abbca55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/unit-tests/unit-keystore.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434

3535
#if defined(__APPLE__) && defined(__MACH__)
3636
#define KEYSTORE_SECTION __attribute__((section ("__KEYSTORE,__keystore")))
37+
#elif defined(_MSC_VER)
38+
/* Create a RW data section named .keystore */
39+
#pragma section(".keystore", read, write)
40+
#define KEYSTORE_SECTION __declspec(allocate(".keystore"))
3741
#else
3842
#define KEYSTORE_SECTION __attribute__((section (".keystore")))
3943
#endif
@@ -48,7 +52,7 @@ const KEYSTORE_SECTION struct keystore_slot PubKeys[NUM_PUBKEYS] = {
4852
.part_id_mask = 0xFFFFFFFF,
4953
.pubkey_size = KEYSTORE_PUBKEY_SIZE_ECC256,
5054
.pubkey = {
51-
55+
5256
0xc5, 0x7d, 0xbf, 0xfb, 0x23, 0x79, 0xba, 0xb6,
5357
0x31, 0x8f, 0x7b, 0x8d, 0xfe, 0xc9, 0x5d, 0x46,
5458
0xf5, 0x95, 0xb4, 0xa8, 0xbd, 0x45, 0xb7, 0x46,

0 commit comments

Comments
 (0)