Skip to content

Commit

Permalink
Fix a few build errors
Browse files Browse the repository at this point in the history
Change-Id: I1311e4f9bb2409e856df3d333cc0d6c3f8f097f8
  • Loading branch information
Dees-Troy committed Sep 15, 2017
1 parent c3c0e64 commit d9918b7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
10 changes: 7 additions & 3 deletions Android.mk
Expand Up @@ -558,7 +558,9 @@ endif # !TW_USE_TOOLBOX
# ===============================
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := recovery-persist.cpp
LOCAL_SRC_FILES := \
recovery-persist.cpp \
rotate_logs.cpp
LOCAL_MODULE := recovery-persist
LOCAL_SHARED_LIBRARIES := liblog libbase
LOCAL_CFLAGS := -Werror
Expand All @@ -570,9 +572,11 @@ endif
# ===============================
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := recovery-refresh.cpp
LOCAL_SRC_FILES := \
recovery-refresh.cpp \
rotate_logs.cpp
LOCAL_MODULE := recovery-refresh
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_SHARED_LIBRARIES := liblog libbase
LOCAL_CFLAGS := -Werror
LOCAL_INIT_RC := recovery-refresh.rc
include $(BUILD_EXECUTABLE)
Expand Down
1 change: 1 addition & 0 deletions installcommand.cpp
Expand Up @@ -19,6 +19,7 @@
#include <vector>

#ifdef AB_OTA_UPDATER
#include <inttypes.h>
#include <map>
#include <android-base/parseint.h>
#include <android-base/stringprintf.h>
Expand Down
4 changes: 4 additions & 0 deletions prebuilt/Android.mk
Expand Up @@ -257,6 +257,10 @@ ifeq ($(TWRP_INCLUDE_LOGCAT), true)
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcrecpp.so
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblogcat.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcap.so
endif
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre2.so
Expand Down
2 changes: 1 addition & 1 deletion rotate_logs.cpp
Expand Up @@ -74,7 +74,7 @@ ssize_t logrotate(
name += ".1";
} else {
size_t i;
if (!android::base::ParseUint(number, &i)) {
if (!android::base::ParseUint(number.c_str(), &i)) {
LOG(ERROR) << "failed to parse uint in " << number;
return -1;
}
Expand Down

0 comments on commit d9918b7

Please sign in to comment.