This patch is for develop-olympus. It conflicts with changes made so far in PHPBB3-9823.
The version for PHPBB3-9823 is here: https://github.com/p/phpbb3/commit/d99e1431abf8684078e5a8a09b5fcfa59e2a9412
Seeing how PHPBB3-9823 is not merged yet, maybe the best way to proceed here is to merge the develop-olympus fix here first and then squash the develop fix into the appropriate commit on nickvergessen's branch.
Remember to test this on a 32-bit system prior to merging, and double-check that the magic number is correct.
It may be worth making the magic number into a named constant, as it is used a number of times in develop (mostly in tests).