diff options
author | danitool | 2015-09-13 11:32:41 +0200 |
---|---|---|
committer | danitool | 2015-09-13 11:32:41 +0200 |
commit | 82565f746964a4d59b343c916a70ce5a640f2650 (patch) | |
tree | 7303fc5e832e1075047bb45f9a0ca209c2f479b7 /libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch | |
download | aur-82565f746964a4d59b343c916a70ce5a640f2650.tar.gz |
Initial import
Diffstat (limited to 'libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch')
-rw-r--r-- | libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch b/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch new file mode 100644 index 000000000000..548903083933 --- /dev/null +++ b/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch @@ -0,0 +1,16 @@ +--- Source/C/NCSUtil/malloc.c.ori 2010-02-02 00:09:24.000000000 +0100 ++++ Source/C/NCSUtil/malloc.c 2010-02-02 00:17:13.000000000 +0100 +@@ -390,7 +390,12 @@ + #else /* SOLARIS */ + + #ifdef LINUX +- return(sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE)); ++ long nPages = sysconf(_SC_PHYS_PAGES); ++ long nPageSize = sysconf(_SC_PAGESIZE); ++ if (nPages > INT_MAX / nPageSize) ++ return INT_MAX; ++ else ++ return (INT32)(nPages * nPageSize); + #elif defined MACOSX + return(128*1024*1024); + |