summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2015-04-27 08:36:16 +0000
committerJean Delvare <jdelvare@suse.de>2015-04-27 08:36:16 +0000
commitaaf09f62ce6a8925239bf588521388be5fa6c2db (patch)
treeaab2e0e6114fd61c3f3e4a2223e60219086ecc90 /util.c
parent04902df9805a9b5775f5d2883576fa439132653b (diff)
downloaddmidecode-git-aaf09f62ce6a8925239bf588521388be5fa6c2db.tar.gz
dmidecode: Add support for 64-bit addresses
We can easily support 64-bit addresses by compiling dmidecode with -D_FILE_OFFSET_BITS=64. This looks reasonably portable. Also add support for 32-bit long tables, as SMBIOS 3.0.0 allows it, even though I don't expect to see such a long DMI table any time soon.
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c
index c8ce365..026855a 100644
--- a/util.c
+++ b/util.c
@@ -2,7 +2,7 @@
* Common "util" functions
* This file is part of the dmidecode project.
*
- * Copyright (C) 2002-2010 Jean Delvare <jdelvare@suse.de>
+ * Copyright (C) 2002-2015 Jean Delvare <jdelvare@suse.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -147,12 +147,12 @@ void *read_file(size_t max_len, const char *filename)
* Copy a physical memory chunk into a memory buffer.
* This function allocates memory.
*/
-void *mem_chunk(size_t base, size_t len, const char *devmem)
+void *mem_chunk(off_t base, size_t len, const char *devmem)
{
void *p;
int fd;
#ifdef USE_MMAP
- size_t mmoffset;
+ off_t mmoffset;
void *mmp;
#endif