upgrade-apply-deltafs: Add possibility to build this binary on host by adding a cmake...
[platform/core/system/upgrade.git] / src / upgrade-apply-deltafs / ua.c
index 726199c..dd231bd 100755 (executable)
@@ -33,7 +33,9 @@
 #include <string.h>
 #include <getopt.h>
 
+#ifndef HOST_BUILD
 #include <hal/device/hal-board.h>
+#endif
 
 #include "ua.h"
 #include "fota_util.h"
@@ -200,10 +202,13 @@ update_progress:
 static void set_upgrade_progress(int percent)
 {
        int relative_precent = HAL_PROGRESS_MIN + ((HAL_PROGRESS_MAX - HAL_PROGRESS_MIN) * percent)/100;
+
+#ifndef HOST_BUILD
        if (hal_device_board_set_upgrade_status(relative_precent) < 0) {
                LOG("set_upgrade_status failed: %d\n", relative_precent);
                return;
        }
+#endif
 
        LOG("set_upgrade_status success: %d\n", relative_precent);
 }