diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-03-08 01:56:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-08 01:56:13 +0000 |
commit | c1790a0b99bd55ec1eb2201e60e8c2167a334c7c (patch) | |
tree | a59249069fde5b4ca2f2c20b7c39f22d3420dd78 | |
parent | f2d09863204fc04c7f030ce7adf51deb5de952ce (diff) | |
parent | 0c3d19ff3db7b04081a7a729a81642c5903f741a (diff) | |
download | system_core-c1790a0b99bd55ec1eb2201e60e8c2167a334c7c.zip system_core-c1790a0b99bd55ec1eb2201e60e8c2167a334c7c.tar.gz system_core-c1790a0b99bd55ec1eb2201e60e8c2167a334c7c.tar.bz2 |
am 0c3d19ff: Merge "libcutils: 64-bit compile issues"
* commit '0c3d19ff3db7b04081a7a729a81642c5903f741a':
libcutils: 64-bit compile issues
-rw-r--r-- | libcutils/qtaguid.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c index 5bb8176..899a7b4 100644 --- a/libcutils/qtaguid.c +++ b/libcutils/qtaguid.c @@ -19,14 +19,16 @@ #define LOG_TAG "qtaguid" -#include <cutils/qtaguid.h> -#include <cutils/log.h> #include <errno.h> #include <fcntl.h> +#include <inttypes.h> +#include <pthread.h> #include <stdio.h> #include <string.h> #include <unistd.h> -#include <pthread.h> + +#include <cutils/qtaguid.h> +#include <log/log.h> static const char* CTRL_PROCPATH = "/proc/net/xt_qtaguid/ctrl"; static const int CTRL_MAX_INPUT_LEN = 128; @@ -103,13 +105,13 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { pthread_once(&resTrackInitDone, qtaguid_resTrack); - snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid); + snprintf(lineBuf, sizeof(lineBuf), "t %d %" PRIu64 " %d", sockfd, kTag, uid); - ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid); + ALOGV("Tagging socket %d with tag %" PRIx64 "{%u,0} for uid %d", sockfd, kTag, tag, uid); res = write_ctrl(lineBuf); if (res < 0) { - ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d", + ALOGI("Tagging socket %d with tag %" PRIx64 "(%d) for uid %d failed errno=%d", sockfd, kTag, tag, uid, res); } @@ -147,14 +149,14 @@ int qtaguid_deleteTagData(int tag, uid_t uid) { int fd, cnt = 0, res = 0; uint64_t kTag = (uint64_t)tag << 32; - ALOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid); + ALOGV("Deleting tag data with tag %" PRIx64 "{%d,0} for uid %d", kTag, tag, uid); pthread_once(&resTrackInitDone, qtaguid_resTrack); - snprintf(lineBuf, sizeof(lineBuf), "d %llu %d", kTag, uid); + snprintf(lineBuf, sizeof(lineBuf), "d %" PRIu64 " %d", kTag, uid); res = write_ctrl(lineBuf); if (res < 0) { - ALOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d", + ALOGI("Deleting tag data with tag %" PRIx64 "/%d for uid %d failed with cnt=%d errno=%d", kTag, tag, uid, cnt, errno); } |