Fix compilation
diff --git a/src/rp2_common/pico_bootrom/bootrom.c b/src/rp2_common/pico_bootrom/bootrom.c
index 1b608ca..eb70f2a 100644
--- a/src/rp2_common/pico_bootrom/bootrom.c
+++ b/src/rp2_common/pico_bootrom/bootrom.c
@@ -204,7 +204,7 @@
     int ret;
     uint32_t buffer[(16 * 2) + 1] = {}; // maximum of 16 partitions, each with 2 words returned, plus 1
     // Initially assume that the partition_num is the A partition
-    int partition_a_num = partition_num;
+    uint partition_a_num = partition_num;
     ret = rom_get_b_partition(partition_num);
 
     if (ret < 0) {
diff --git a/src/rp2_common/pico_bootrom/include/pico/bootrom.h b/src/rp2_common/pico_bootrom/include/pico/bootrom.h
index 5e1598b..b360bae 100644
--- a/src/rp2_common/pico_bootrom/include/pico/bootrom.h
+++ b/src/rp2_common/pico_bootrom/include/pico/bootrom.h
@@ -1042,7 +1042,7 @@
     return func(callback_num, funcptr);
 }
 
-#ifndef __riscv
+#if PICO_SECURE || PICO_NONSECURE
 int rom_secure_call(uint a, uint b, uint c, uint d, uint func);
 
 int rom_default_callback(uint32_t a, uint32_t b, uint32_t c, uint32_t d, uint32_t fn);
@@ -1259,7 +1259,7 @@
 }
 #endif
 
-#endif  // ifndef __riscv
+#endif  // PICO_SECURE || PICO_NONSECURE
 
 /*!
  * \brief Get system information