Skip to content

MacOS ARM64 build error: symbol fdopen is duplicated defined #4586

@JackyWoo

Description

@JackyWoo

Describe the bug
Env: MacOS 14.4.1 ARM64 clang 18, build project with cmake.

symbol fdopen is duplicated defined.

In file included from /Users/wujianchao5/project/jd/poco/Foundation/src/zutil.c:10:
In file included from /Users/wujianchao5/project/jd/poco/Foundation/src/gzguts.h:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/stdio.h:220:7: error: expected identifier or '('
  220 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
/Users/wujianchao5/project/jd/poco/Foundation/src/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/opt/homebrew/Cellar/llvm/18.1.6/lib/clang/18/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)
      |                ^
In file included from /Users/wujianchao5/project/jd/poco/Foundation/src/zutil.c:10:
In file included from /Users/wujianchao5/project/jd/poco/Foundation/src/gzguts.h:21:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/stdio.h:220:7: error: expected ')'
/Users/wujianchao5/project/jd/poco/Foundation/src/zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */
      |                                 ^
/opt/homebrew/Cellar/llvm/18.1.6/lib/clang/18/include/__stddef_null.h:26:16: note: expanded from macro 'NULL'
   26 | #define NULL ((void*)0)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions