drm_hwcomposer: Fix DrmConnector log build failure
This fix is the same as the previous commit on DrmProperty:
2c36651af0ad ("drm_hwcomposer: Fix DrmProperty log build failure")
So copy the commit message of it here for reference convenience.
DrmConnector logs the uint64_t property value if it is unrecognized.
However, this type can be represented multiple ways:
* unsigned long (%lu)
* unsigned long long (%llu)
This generates build errors when the wrong type is used.
The correct way to log the value is with |PRIu64|.
Change-Id: Ie59ac6930919f77c16c064f3d5becfa794ed37a3
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
diff --git a/drm/DrmConnector.cpp b/drm/DrmConnector.cpp
index c46effa..eeec3b1 100644
--- a/drm/DrmConnector.cpp
+++ b/drm/DrmConnector.cpp
@@ -23,6 +23,7 @@
#include <array>
#include <cerrno>
+#include <cinttypes>
#include <cstdint>
#include <sstream>
@@ -279,7 +280,7 @@
return panel_orientation_enum_map_[panel_orientation_value];
}
- ALOGE("Unknown panel orientation: panel_orientation = %lu",
+ ALOGE("Unknown panel orientation: panel_orientation = %" PRIu64,
panel_orientation_value);
return {};
}