Skip to content

Commit 40a8b89

Browse files
committed
Make console example work with my GCC version (add _GNU_SOURCE)
1 parent e4f2ef0 commit 40a8b89

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* along with this library. If not, see <http://www.gnu.org/licenses/>.
1919
*/
2020

21+
#define _GNU_SOURCE /* See feature_test_macros(7) */
2122
#include <libopencm3/stm32/rcc.h>
2223
#include <libopencm3/stm32/gpio.h>
2324
#include <libopencm3/stm32/usart.h>

examples/stm32/f4/stm32f429i-discovery/lcd-dma/console.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*
2323
*/
2424

25+
#define _GNU_SOURCE
2526
#include <stdint.h>
2627
#include <stdio.h>
2728
#include <setjmp.h>

0 commit comments

Comments
 (0)