util.h must be the first include to #define _POSIX_C_SOURCE

This commit is contained in:
inikep 2016-04-29 15:18:50 +02:00
parent 55d047aa92
commit 4f832c9f26
5 changed files with 5 additions and 4 deletions

View File

@ -436,6 +436,7 @@ static void BMK_loadFiles(void* buffer, size_t bufferSize,
U64 fileSize = UTIL_getFileSize(fileNamesTable[n]);
if (UTIL_isDirectory(fileNamesTable[n])) {
DISPLAYLEVEL(2, "Ignoring %s directory... \n", fileNamesTable[n]);
fileSizes[n] = 0;
continue;
}
f = fopen(fileNamesTable[n], "rb");

View File

@ -43,11 +43,11 @@
/*-*************************************
* Includes
***************************************/
#include "util.h" /* UTIL_GetFileSize */
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
#include <stdio.h> /* fprintf, fopen, ftello64 */
#include "util.h" /* UTIL_GetFileSize */
#include "mem.h" /* read */
#include "error_private.h"
#include "dibio.h"

View File

@ -61,7 +61,7 @@
#include <time.h> /* clock */
#include <errno.h> /* errno */
#include "util.h" /* UTIL_GetFileSize */
#include "util.h" /* UTIL_GetFileSize */
#include "mem.h"
#include "fileio.h"
#include "zstd_static.h" /* ZSTD_magicNumber, ZSTD_frameHeaderSize_max */

View File

@ -46,7 +46,7 @@
#include <string.h> /* strcmp */
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
#include "util.h" /* UTIL_GetFileSize */
#include "util.h" /* UTIL_GetFileSize */
#include "mem.h"
#include "zstd_static.h"
#include "fse_static.h"

View File

@ -50,6 +50,7 @@
/*-************************************
* Dependencies
**************************************/
#include "util.h" /* UTIL_GetFileSize */
#include <stdlib.h> /* malloc */
#include <stdio.h> /* fprintf, fopen, ftello64 */
#include <string.h> /* strcmp */
@ -62,7 +63,6 @@
# include <sys/time.h> /* gettimeofday */
#endif
#include "util.h" /* UTIL_GetFileSize */
#include "mem.h"
#include "zstd_static.h"
#include "datagen.h"