Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-declaration of O_BINARY when building with Cygwin (win64) #788

Closed
sharma-kullu opened this issue Mar 31, 2019 · 2 comments
Closed

Re-declaration of O_BINARY when building with Cygwin (win64) #788

sharma-kullu opened this issue Mar 31, 2019 · 2 comments

Comments

@sharma-kullu
Copy link

[RELEASE] 
Scanning dependencies of target stlink 
[  3%] Building C object CMakeFiles/stlink.dir/src/chipid.c.obj
[  6%] Building C object CMakeFiles/stlink.dir/src/common.c.obj /home/alam/stlink/src/common.c:19:0: error: "O_BINARY" redefined [-Werror]  
#define O_BINARY 0 //! @todo get rid of this OH MY (@xor-gate)  
In file included from /usr/include/sys/fcntl.h:3:0,                  
from /usr/include/fcntl.h:12,                  
from /home/alam/stlink/src/common.c:10: 
/usr/include/sys/_default_fcntl.h:75:0: note: this is the location of the previous definition 
#define O_BINARY _FBINARY  cc1: all warnings being treated as errors make[3]: *** [CMakeFiles/stlink.dir/build.make:87: 
CMakeFiles/stlink.dir/src/common.c.obj] Error 1 
make[2]: *** [CMakeFiles/Makefile2:68: CMakeFiles/stlink.dir/all] Error 2 
make[1]: *** [Makefile:150: all] Error 2 
make: *** [Makefile:28: release] Error 2

OS: Cygwin for windows (64 bit)

@xor-gate xor-gate changed the title Build errors Re-declaration of O_BINARY when building with Cygwin (win64) Apr 3, 2019
@xor-gate
Copy link
Member

xor-gate commented Apr 3, 2019

This is problem because under Cygwin O_BINARY is defined and under Mingw it is not. So there should be a extra compiler definition check to the custom memmap *NIX libc C function.

@Nightwalker-87 Nightwalker-87 added this to the General milestone Feb 19, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.7.0, Feedback required Mar 14, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Old issues, v1.6.1 Apr 7, 2020
@Nightwalker-87 Nightwalker-87 added this to To do in Release v1.6.1 via automation Apr 7, 2020
Nightwalker-87 added a commit that referenced this issue Apr 7, 2020
Release v1.6.1 automation moved this from To do to Done Apr 7, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Apr 7, 2020
Nightwalker-87 added a commit that referenced this issue Apr 8, 2020
Nightwalker-87 added a commit that referenced this issue Apr 8, 2020
@Nightwalker-87
Copy link
Member

Closed by commit 9f2cad2.

grevaillot pushed a commit to grevaillot/stlink that referenced this issue Apr 10, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants