From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 276C4386F804; Sun, 3 Jan 2021 18:24:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 276C4386F804 From: "danglin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/98506] New: ../../gcc/libcody/resolver.cc:178:43: error: 'O_CLOEXEC' was not declared in thi s scope Date: Sun, 03 Jan 2021 18:24:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2021 18:24:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98506 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=3Dc++11 -g -fno-enforce-eh-specs -fno-stack-protector -fno-threadsafe-sta tics -fno-exceptions -fno-rtti -fdebug-prefix-map=3D../../gcc/libcody/=3D -= 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 =3D open (REPO_DIR, O_RDONLY | O_CLOEXEC | O_DIRECTORY); ^~~~~~~~~ ../../gcc/libcody/resolver.cc:178:43: note: suggested alternative: 'FD_CLOE= XEC' int fd_dir =3D 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 =3D open (REPO_DIR, O_RDONLY | O_CLOEXEC | O_DIRECTORY); ^~~~~~~~~~~ ../../gcc/libcody/resolver.cc:178:55: note: suggested alternative: 'O_DIREC= T' int fd_dir =3D 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) =3D=3D 0 ^~~~~~~ ../../gcc/libcody/resolver.cc:180:10: note: suggested alternative: 'fstat64' && fstatat (fd_dir, cmi.c_str (), &statbuf, 0) =3D=3D 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__ >=3D 101000)) // Autoconf test? #define HAVE_FSTATAT 1 #else #define HAVE_FSTATAT 0 #endif=