summaryrefslogtreecommitdiffstats
path: root/drm/common/ReadWriteUtils.cpp
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2010-11-19 15:19:36 -0800
committerGloria Wang <gwang@google.com>2010-11-19 15:52:32 -0800
commita2cd44cb5067b4fe98794860690394254d3ac73c (patch)
tree08a581d8684a550faa9f5cb76dc5cab96e641f81 /drm/common/ReadWriteUtils.cpp
parentc726bd8b7b9929fd917b01e5551a66ad5fe2c04e (diff)
downloadframeworks_av-a2cd44cb5067b4fe98794860690394254d3ac73c.zip
frameworks_av-a2cd44cb5067b4fe98794860690394254d3ac73c.tar.gz
frameworks_av-a2cd44cb5067b4fe98794860690394254d3ac73c.tar.bz2
64-bit file size/offset support for DRM framework
Change-Id: I0ba7147607825234df9fa28732e1bba344e82e79
Diffstat (limited to 'drm/common/ReadWriteUtils.cpp')
-rw-r--r--drm/common/ReadWriteUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drm/common/ReadWriteUtils.cpp b/drm/common/ReadWriteUtils.cpp
index 7ec4fa2..c16214e 100644
--- a/drm/common/ReadWriteUtils.cpp
+++ b/drm/common/ReadWriteUtils.cpp
@@ -42,7 +42,7 @@ String8 ReadWriteUtils::readBytes(const String8& filePath) {
struct stat sb;
if (fstat(fd, &sb) == 0 && sb.st_size > 0) {
- int length = sb.st_size;
+ off64_t length = sb.st_size;
char* bytes = new char[length];
if (length == read(fd, (void*) bytes, length)) {
string.append(bytes, length);
@@ -57,7 +57,7 @@ String8 ReadWriteUtils::readBytes(const String8& filePath) {
int ReadWriteUtils::readBytes(const String8& filePath, char** buffer) {
FILE* file = NULL;
file = fopen(filePath.string(), "r");
- int length = 0;
+ off64_t length = 0;
if (NULL != file) {
int fd = fileno(file);