Skip to content

Commit a18d130

Browse files
rgetzcommodo
authored andcommitted
examples: fix issues that were pointed out on the CI
In the cmake, we already define some of these, so no need to define things twice. Check beforehand. Signed-off-by: Robin Getz <[email protected]>
1 parent 7a8fbe2 commit a18d130

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

examples/iio-monitor.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@
1919
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2020
* */
2121

22-
#define _BSD_SOURCE
23-
#define _GNU_SOURCE
24-
#define _DEFAULT_SOURCE
22+
#ifndef _BSD_SOURCE
23+
#define _BSD_SOURCE 1
24+
#endif
25+
26+
#ifndef _GNU_SOURCE
27+
#define _GNU_SOURCE 1
28+
#endif
29+
30+
#ifndef _DEFAULT_SOURCE
31+
#define _DEFAULT_SOURCE 1
32+
#endif
2533

2634
#include <cdk.h>
2735
#include <locale.h>

0 commit comments

Comments
 (0)