summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-12-20 18:31:05 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-12-20 18:31:05 (GMT)
commit2efedaf7dc8f20d2e5761ee600712bdb0371bc5c (patch)
tree4d1d3ba951f814bb00094f1cc1f2e35abf7282bb /programs
parent6adf05d1ed83053b8bb1f762494d2c10fdd8ac1d (diff)
downloadlz4-2efedaf7dc8f20d2e5761ee600712bdb0371bc5c.zip
lz4-2efedaf7dc8f20d2e5761ee600712bdb0371bc5c.tar.gz
lz4-2efedaf7dc8f20d2e5761ee600712bdb0371bc5c.tar.bz2
fixed gcc warnings
Diffstat (limited to 'programs')
-rw-r--r--programs/platform.h2
-rw-r--r--programs/util.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/programs/platform.h b/programs/platform.h
index df70037..244b2d8 100644
--- a/programs/platform.h
+++ b/programs/platform.h
@@ -116,9 +116,9 @@ extern "C" {
# include <fcntl.h> /* _O_BINARY */
# include <io.h> /* _setmode, _fileno, _get_osfhandle */
# if !defined(__DJGPP__)
-# define SET_BINARY_MODE(file) { int unused=_setmode(_fileno(file), _O_BINARY); (void)unused; }
# include <windows.h> /* DeviceIoControl, HANDLE, FSCTL_SET_SPARSE */
# include <winioctl.h> /* FSCTL_SET_SPARSE */
+# define SET_BINARY_MODE(file) { int unused=_setmode(_fileno(file), _O_BINARY); (void)unused; }
# define SET_SPARSE_FILE_MODE(file) { DWORD dw; DeviceIoControl((HANDLE) _get_osfhandle(_fileno(file)), FSCTL_SET_SPARSE, 0, 0, 0, 0, &dw, 0); }
# else
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
diff --git a/programs/util.h b/programs/util.h
index 5ec1a4a..b0529b0 100644
--- a/programs/util.h
+++ b/programs/util.h
@@ -34,6 +34,7 @@ extern "C" {
******************************************/
#include "platform.h" /* Compiler options, PLATFORM_POSIX_VERSION */
#include <stdlib.h> /* malloc */
+#include <stddef.h> /* size_t, ptrdiff_t */
#include <stdio.h> /* fprintf */
#include <sys/types.h> /* stat, utime */
#include <sys/stat.h> /* stat */
@@ -339,6 +340,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
#elif defined(__linux__) || (PLATFORM_POSIX_VERSION >= 200112L) /* opendir, readdir require POSIX.1-2001 */
# define UTIL_HAS_CREATEFILELIST
# include <dirent.h> /* opendir, readdir */
+# include <string.h> /* strerror, memcpy */
UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_t* pos, char** bufEnd)
{