https://bugs.winehq.org/show_bug.cgi?id=52374
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|compiling on Cygwin fails: |build on Cygwin fails: |error: ‘S_IRUSR’ undeclared |error: ‘S_IRUSR’ undeclared |(in libs/mpg123) |(in libs/mpg123) Priority|P2 |P4 Severity|normal |blocker
--- Comment #1 from Saulius K. saulius2@gmail.com --- To me it seems that compiler doesn't pick up the following header file from libs/mpg123/src/compat/compat.c:
--- snip --- #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif --- snip ---
If I trace included header files:
--- snip --- $ gcc -c -H libs/mpg123/src/compat/compat.c -Ilibs/mpg123 -Iinclude -Iinclude/msvcrt -Ilibs/mpg123/src -Ilibs/mpg123/src/compat -Ilibs/mpg123/src/libmpg123 -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT -DNO_CATCHSIGNAL -DMPG123_NO_LARGENAME -D_UCRT -fasynchronous-unwind-tables -D_WIN32 -fno-builtin -fshort-wchar -D__WINE_PE_BUILD -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing -Wno-packed-not-aligned -gdwarf-4 -fno-omit-frame-pointer -g -O2 |& grep -e stat.h . include/msvcrt/sys/stat.h --- snip ---
... only include/msvcrt/sys/stat.h seems to be included. But the the header from Cygwin isn't tried. It's present on system along with the defines, though:
--- snip --- $ grep S_IRUSR /usr/include/sys/stat.h #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #define S_IRUSR 0000400 /* read permission, owner */ #define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */ --- snip ---