aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.c
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2020-03-14 18:52:56 +0800
committerGao Xiang <gaoxiang25@huawei.com>2020-03-27 16:52:31 +0800
commitd4a161552becafeb1ebb98ec7e28675cb25fc548 (patch)
treef29e7ec3c211fb8f382965b63351104cc0a74bde /lib/compress.c
parentacd5f76653d0b455de537a271dca93ddc1c4f2e3 (diff)
downloaderofs-utils-d4a161552becafeb1ebb98ec7e28675cb25fc548.tar.gz
erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition
This patch can be used to resolve the following build errors: compress.c:10: error: "_LARGEFILE64_SOURCE" redefined [-Werror] #define _LARGEFILE64_SOURCE <command-line>: note: this is the location of the previous definition io.c:9: error: "_LARGEFILE64_SOURCE" redefined [-Werror] #define _LARGEFILE64_SOURCE <command-line>: note: this is the location of the previous definition Link: https://lore.kernel.org/r/20200314105256.20142-1-hsiangkao@aol.com Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Diffstat (limited to 'lib/compress.c')
-rw-r--r--lib/compress.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compress.c b/lib/compress.c
index 8337487..b14ff17 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -7,7 +7,9 @@
* Created by Miao Xie <miaoxie@huawei.com>
* with heavy changes by Gao Xiang <gaoxiang25@huawei.com>
*/
+#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
+#endif
#include <string.h>
#include <stdlib.h>
#include <unistd.h>