https://bugs.winehq.org/show_bug.cgi?id=50255
Bug ID: 50255 Summary: server/fd.c:1986:18: error: 'O_SYMLINK' undeclared Product: Wine-staging Version: 6.0-rc1 Hardware: x86-64 OS: FreeBSD Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: gerald@pfeifer.com CC: leslie_alistair@hotmail.com, marcus@jet.franken.de, z.figura12@gmail.com
Created attachment 68780 --> https://bugs.winehq.org/attachment.cgi?id=68780 Proposed patch to unbreak the build
6.0-rc1 features a new build failure versus 5.22:
server/fd.c: In function 'open_fd': server/fd.c:1986:18: error: 'O_SYMLINK' undeclared (first use in this function) 1986 | flags |= O_SYMLINK; | ^~~~~~~~~
Indeed O_SYMLINK appears nowhere under /usr/include on FreeBSD 11.x nor on my openSUSE system with glibc 2.32.
The latter does have O_PATH, so the following snippet from server/fd.c comes to the rescue:
#if !defined(O_SYMLINK) && defined(O_PATH) # define O_SYMLINK (O_NOFOLLOW | O_PATH) #endif
The attached patch fixes (or works around) this issue. Successfully tested on FreeBSD 11/i386.