Fix Chrome OS build of update_engine.
Fix a typo in image_properties_chromeos.cc, $ifdef out an unused
constant in Chrome OS and adds the bspatch library to the Chrome OS
build.
Bug: None
Test: FEATURES=test emerge-link update_engine
Change-Id: I483da4b43b5cbd8b7349b0ff42973f97d197ba8e
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index f3d6a18..cb038a5 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -52,9 +52,6 @@
const int kNoNetworkRetrySeconds = 10;
-// Socket tag used by all network sockets. See qtaguid kernel module for stats.
-const int kUpdateEngineSocketTag = 0x55417243; // "CrAU" in little-endian.
-
// libcurl's CURLOPT_SOCKOPTFUNCTION callback function. Called after the socket
// is created but before it is connected. This callback tags the created socket
// so the network usage can be tracked in Android.
@@ -62,6 +59,9 @@
curl_socket_t curlfd,
curlsocktype /* purpose */) {
#ifdef __ANDROID__
+ // Socket tag used by all network sockets. See qtaguid kernel module for
+ // stats.
+ const int kUpdateEngineSocketTag = 0x55417243; // "CrAU" in little-endian.
qtaguid_tagSocket(curlfd, kUpdateEngineSocketTag, AID_OTA_UPDATE);
#endif // __ANDROID__
return CURL_SOCKOPT_OK;