Repository navigation
adb: keep libbase logging macros after protobuf includes - #213
Merged
Merged
Conversation
Fix build with protobuf >= 36 Based on arch linux patch https://gitlab.archlinux.org/archlinux/packaging/packages/android-tools/-/blob/03fecd370e9633927b8157ab94a7db11e7b8cf16/protobuf-36-absl-log-macros.patch Please create a new release (eg. 37.0.0p1) if this PR is accepted.
Collaborator
|
Thanks for the contribution. I can reproduce the build error in ArchLinux. The build output shows a warning first as following but it causes compiler error later.
The patch seems to be based on the assumption that "sysdeps.h is the first include for most adb translation units". Anyway, I can't think of a better solution :) |
Biswa96
approved these changes
Sep 27, 2026
Collaborator
|
I just realized that Would it be possible to add the following section in the patch file? This redefines the logging macro like it was done in mdns_tracker.cpp. @felixonmars --- a/client/adb_install.cpp
+++ b/client/adb_install.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include "sysdeps.h"
#include "adb_install.h"
#include <fcntl.h>
@@ -39,7 +40,6 @@
#include "commandline.h"
#include "fastdeploy.h"
#include "incremental.h"
-#include "sysdeps.h"
using namespace std::literals; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix build with protobuf >= 36
Based on arch linux patch
https://gitlab.archlinux.org/archlinux/packaging/packages/android-tools/-/blob/03fecd370e9633927b8157ab94a7db11e7b8cf16/protobuf-36-absl-log-macros.patch
Please create a new release (eg. 37.0.0p1) if this PR is accepted.