Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Fix macOS build (#450)
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Tian <[email protected]>
  • Loading branch information
tianjunwork authored Dec 13, 2019
1 parent 726fa72 commit 57b81a7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Source/App/EbAppProcessCmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,10 +981,10 @@ void fillOneSegment(
int32_t value;
int32_t result = 0;

#if __linux
result = fscanf(config->segmentOvFile, "%u %u %u %u %d %u\n", &x1, &y1, &x2, &y2, &value, &mode);
#else
#ifdef _WIN32
result = fscanf_s(config->segmentOvFile, "%u %u %u %u %d %u\n", &x1, &y1, &x2, &y2, &value, &mode);
#else
result = fscanf(config->segmentOvFile, "%u %u %u %u %d %u\n", &x1, &y1, &x2, &y2, &value, &mode);
#endif

if (result != 6) {
Expand Down Expand Up @@ -1044,21 +1044,21 @@ void fillSegmentOv(

do {
//read number of segments
#if __linux
result = fscanf(config->segmentOvFile, "%d", &segmentNo);
#else
#ifdef _WIN32
result = fscanf_s(config->segmentOvFile, "%u", &segmentNo);
#else
result = fscanf(config->segmentOvFile, "%d", &segmentNo);
#endif
if (result == 1) {
for (uint32_t segment = 0; segment < segmentNo; segment++) {
fillOneSegment(config, headerPtr);
}
}
if (result == 0) //line is corrupted skip it
#if __linux
result = fscanf(config->segmentOvFile, "%*[^\n]\n");
#else
#ifdef _WIN32
result = fscanf_s(config->segmentOvFile, "%*[^\n]\n");
#else
result = fscanf(config->segmentOvFile, "%*[^\n]\n");
#endif
if (result == -1) {//eof
fseek(config->segmentOvFile, 0, SEEK_SET);
Expand Down

0 comments on commit 57b81a7

Please sign in to comment.