public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/98506] New: ../../gcc/libcody/resolver.cc:178:43: error: 'O_CLOEXEC' was not declared in thi s scope
@ 2021-01-03 18:24 danglin at gcc dot gnu.org
  2021-01-05 13:39 ` [Bug bootstrap/98506] " nathan at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: danglin at gcc dot gnu.org @ 2021-01-03 18:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98506

            Bug ID: 98506
           Summary: ../../gcc/libcody/resolver.cc:178:43: error:
                    'O_CLOEXEC' was not declared in thi s scope
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa*-*-hpux11.11
            Target: hppa*-*-hpux11.11
             Build: hppa*-*-hpux11.11

g++ -std=c++11 -g -fno-enforce-eh-specs -fno-stack-protector
-fno-threadsafe-sta
tics -fno-exceptions -fno-rtti -fdebug-prefix-map=../../gcc/libcody/= -W -Wall
-
include config.h -I../../gcc/libcody \
  -MMD -MP -MF resolver.d -c -o resolver.o ../../gcc/libcody/resolver.cc
../../gcc/libcody/resolver.cc: In member function 'virtual int
Cody::Resolver::I
ncludeTranslateRequest(Cody::Server*, Cody::Flags, std::__cxx11::string&)':
../../gcc/libcody/resolver.cc:178:43: error: 'O_CLOEXEC' was not declared in
thi
s scope
   int fd_dir = open (REPO_DIR, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
                                           ^~~~~~~~~
../../gcc/libcody/resolver.cc:178:43: note: suggested alternative: 'FD_CLOEXEC'
   int fd_dir = open (REPO_DIR, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
                                           ^~~~~~~~~
                                           FD_CLOEXEC
../../gcc/libcody/resolver.cc:178:55: error: 'O_DIRECTORY' was not declared in
t
his scope
   int fd_dir = open (REPO_DIR, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
                                                       ^~~~~~~~~~~
../../gcc/libcody/resolver.cc:178:55: note: suggested alternative: 'O_DIRECT'
   int fd_dir = open (REPO_DIR, O_RDONLY | O_CLOEXEC | O_DIRECTORY);
                                                       ^~~~~~~~~~~
                                                       O_DIRECT
../../gcc/libcody/resolver.cc:180:10: error: 'fstatat' was not declared in this
scope
       && fstatat (fd_dir, cmi.c_str (), &statbuf, 0) == 0
          ^~~~~~~
../../gcc/libcody/resolver.cc:180:10: note: suggested alternative: 'fstat64'
       && fstatat (fd_dir, cmi.c_str (), &statbuf, 0) == 0
          ^~~~~~~
          fstat64
make[3]: *** [Makefile:127: resolver.o] Error 1
make[3]: Leaving directory '/test/gnu/gcc/objdir/libcody'
make[2]: *** [Makefile:10195: all-stage1-libcody] Error 2

Possible fix is here:
https://gcc.gnu.org/pipermail/gcc-patches/2020-December/562508.html

Another alternative would be autoconf check?
#if (defined (__unix__)                                                 \
     || (defined (__Apple__)                                            \
         && defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)     \
         && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000))
// Autoconf test?
#define HAVE_FSTATAT 1
#else
#define HAVE_FSTATAT 0
#endif

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

end of thread, other threads:[~2021-01-06 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03 18:24 [Bug bootstrap/98506] New: ../../gcc/libcody/resolver.cc:178:43: error: 'O_CLOEXEC' was not declared in thi s scope danglin at gcc dot gnu.org
2021-01-05 13:39 ` [Bug bootstrap/98506] " nathan at gcc dot gnu.org
2021-01-05 21:09 ` nathan at gcc dot gnu.org
2021-01-06 14:00 ` cvs-commit at gcc dot gnu.org
2021-01-06 14:01 ` danglin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).