erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition
From: Gao Xiang <[email protected]>
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
--- lib/compress.c | 2 ++ lib/io.c | 4 ++++ 2 files changed, 6 insertions(+)
lib/compress.c +2 -0
@@ -7,7 +7,9 @@* Created by Miao Xie <[email protected]> * with heavy changes by Gao Xiang <[email protected]> */ +#ifndef _LARGEFILE64_SOURCE#define _LARGEFILE64_SOURCE +#endif #include <string.h> #include <stdlib.h> #include <unistd.h>
lib/io.c +4 -0
@@ -6,8 +6,12 @@* http://www.huawei.com/ * Created by Li Guifu <[email protected]> */ +#ifndef _LARGEFILE64_SOURCE#define _LARGEFILE64_SOURCE +#endif +#ifndef _GNU_SOURCE#define _GNU_SOURCE +#endif #include <sys/stat.h> #include <sys/ioctl.h> #include "erofs/io.h"
Signature · 1 line
2.20.1
Quoted 7 lines · Gao Xiang
From: Gao Xiang <[email protected]>
This patch can be used to resolve the following build errors:
compress.c:10: error: "
_LARGEFILE64_SOURCE" redefined [-Werror]
#define_LARGEFILE64_SOURCE
Quoted 8 lines
<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
Signed-off-by Gao Xiang <[email protected]>
It looks good
Thanks
Quoted 7 lines · Gao Xiang via Linux-erofs
From: Gao Xiang <[email protected]>
This patch can be used to resolve the following build errors:
compress.c:10: error: "
_LARGEFILE64_SOURCE" redefined [-Werror]
#define_LARGEFILE64_SOURCE
Quoted 8 lines
<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
Signed-off-by Gao Xiang <[email protected]>
Thanks,