Skip to content

Commit 21059b2

Browse files
committed
host: libbladeRF_test: fix printf of int64_t value
Fixes build failure on macOS
1 parent 134ae20 commit 21059b2

File tree

1 file changed

+5
-2
lines changed
  • host/libraries/libbladeRF_test/test_repeater/src

1 file changed

+5
-2
lines changed

host/libraries/libbladeRF_test/test_repeater/src/repeater.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
#include <stdlib.h>
6464
#include <stdio.h>
65+
#include <inttypes.h>
6566
#include <string.h>
6667
#include <pthread.h>
6768
#include <libbladeRF.h>
@@ -518,7 +519,8 @@ static int init_device(struct repeater *repeater, struct repeater_config *config
518519
memcpy(&repeater->gain_range_tx, gain_ptr,
519520
sizeof(struct bladerf_range));
520521

521-
printf("TX gain range is: [%ld, %ld]\r\n", repeater->gain_range_tx.min,
522+
printf("TX gain range is: [%"PRIi64", %"PRIi64"]\r\n",
523+
repeater->gain_range_tx.min,
522524
repeater->gain_range_tx.max);
523525
}
524526

@@ -542,7 +544,8 @@ static int init_device(struct repeater *repeater, struct repeater_config *config
542544
memcpy(&repeater->gain_range_rx, gain_ptr,
543545
sizeof(struct bladerf_range));
544546

545-
printf("RX gain range is: [%ld, %ld]\r\n", repeater->gain_range_rx.min,
547+
printf("RX gain range is: [%"PRIi64", %"PRIi64"]\r\n",
548+
repeater->gain_range_rx.min,
546549
repeater->gain_range_rx.max);
547550
}
548551

0 commit comments

Comments
 (0)