Skip to content

Commit c34da25

Browse files
authored
Merge pull request #87 from CarletonURocketry/syslog-macro-fix
Fix for syslogging error when building with sim
2 parents 8fb405c + ed57552 commit c34da25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

telemetry/src/syslogging.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ FILE *__syslogging_file;
1010
atomic_int syslog_count;
1111

1212
/*
13-
* Sets up the syslogging to a file
14-
* @return Zero on success, or errno on failure
13+
* Sets up the syslogging to a file if syslog output is enabled.
14+
* @return Zero on success or skip, or errno on failure
1515
*/
1616
int setup_syslogging(void) {
17+
#ifdef CONFIG_INSPACE_SYSLOG_PATH
1718
atomic_set(&syslog_count, 0);
1819
__syslogging_file = fopen(CONFIG_INSPACE_SYSLOG_PATH, "a");
1920
if (__syslogging_file == NULL) {
2021
return errno;
2122
}
23+
#endif
2224
return 0;
2325
}
2426

0 commit comments

Comments
 (0)