Linux-EROFS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition
       [not found] <20200314105256.20142-1-hsiangkao.ref@aol.com>
@ 2020-03-14 10:52 ` Gao Xiang via Linux-erofs
  2020-03-26 16:18   ` Li GuiFu via Linux-erofs
  2020-03-27  7:40   ` Chao Yu
  0 siblings, 2 replies; 3+ messages in thread
From: Gao Xiang via Linux-erofs @ 2020-03-14 10:52 UTC (permalink / raw)
  To: linux-erofs, Li Guifu, Li GuiFu

From: Gao Xiang <gaoxiang25@huawei.com>

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

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
 lib/compress.c | 2 ++
 lib/io.c       | 4 ++++
 2 files changed, 6 insertions(+)

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>
diff --git a/lib/io.c b/lib/io.c
index 52f9424..5b998d8 100644
--- a/lib/io.c
+++ b/lib/io.c
@@ -6,8 +6,12 @@
  *             http://www.huawei.com/
  * Created by Li Guifu <bluce.liguifu@huawei.com>
  */
+#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"
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition
  2020-03-14 10:52 ` [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition Gao Xiang via Linux-erofs
@ 2020-03-26 16:18   ` Li GuiFu via Linux-erofs
  2020-03-27  7:40   ` Chao Yu
  1 sibling, 0 replies; 3+ messages in thread
From: Li GuiFu via Linux-erofs @ 2020-03-26 16:18 UTC (permalink / raw)
  To: Gao Xiang, linux-erofs, Li Guifu



On 2020/3/14 18:52, Gao Xiang wrote:
> From: Gao Xiang <gaoxiang25@huawei.com>
> 
> 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
> 
> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>

It looks good
Reviewed-by: Li Guifu <bluce.lee@aliyun.com>
Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition
  2020-03-14 10:52 ` [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition Gao Xiang via Linux-erofs
  2020-03-26 16:18   ` Li GuiFu via Linux-erofs
@ 2020-03-27  7:40   ` Chao Yu
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2020-03-27  7:40 UTC (permalink / raw)
  To: Gao Xiang, linux-erofs, Li Guifu, Li GuiFu

On 2020/3/14 18:52, Gao Xiang via Linux-erofs wrote:
> From: Gao Xiang <gaoxiang25@huawei.com>
> 
> 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
> 
> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200314105256.20142-1-hsiangkao.ref@aol.com>
2020-03-14 10:52 ` [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition Gao Xiang via Linux-erofs
2020-03-26 16:18   ` Li GuiFu via Linux-erofs
2020-03-27  7:40   ` Chao Yu

Linux-EROFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-erofs/0 linux-erofs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-erofs linux-erofs/ https://lore.kernel.org/linux-erofs \
		linux-erofs@lists.ozlabs.org linux-erofs@ozlabs.org
	public-inbox-index linux-erofs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linux-erofs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git