mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
gcc-6.2 compil fixes
Origin commit data
------------------
Commit: b5138018b5
Author: GetAway <get-away@t-online.de>
Date: 2017-01-21 (Sat, 21 Jan 2017)
This commit is contained in:
@@ -66,6 +66,9 @@
|
||||
#include <crc32.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#include <algorithm>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include "rbtree.h"
|
||||
@@ -755,7 +758,11 @@ void CMkfsJFFS2::pad_block_if_less_than(int req)
|
||||
void CMkfsJFFS2::padblock(void)
|
||||
{
|
||||
while (out_ofs % erase_block_size) {
|
||||
#if __cplusplus < 201103
|
||||
full_write(out_fd, ffbuf, min(sizeof(ffbuf),
|
||||
#else
|
||||
full_write(out_fd, ffbuf, std::min(sizeof(ffbuf),
|
||||
#endif
|
||||
(size_t)(erase_block_size - (out_ofs % erase_block_size))));
|
||||
}
|
||||
}
|
||||
@@ -868,7 +875,11 @@ void CMkfsJFFS2::create_target_filesystem(struct filesystem_entry *root)
|
||||
}
|
||||
} else {
|
||||
while (out_ofs < pad_fs_size) {
|
||||
#if __cplusplus < 201103
|
||||
full_write(out_fd, ffbuf, min(sizeof(ffbuf), (size_t)(pad_fs_size - out_ofs)));
|
||||
#else
|
||||
full_write(out_fd, ffbuf, std::min(sizeof(ffbuf), (size_t)(pad_fs_size - out_ofs)));
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user