diff options
author | 2011-04-29 00:03:00 +0000 | |
---|---|---|
committer | 2011-04-29 00:03:00 +0000 | |
commit | d3046dd7a8e66286d84c37a1b937e0b303713e94 (patch) | |
tree | 19bf1dab4c7ed72db12b6f281b588bbc21488eeb /app-admin/logrotate/files | |
parent | Version bump to get a change made to the gcc-config bash script (diff) | |
download | gentoo-2-d3046dd7a8e66286d84c37a1b937e0b303713e94.tar.gz gentoo-2-d3046dd7a8e66286d84c37a1b937e0b303713e94.tar.bz2 gentoo-2-d3046dd7a8e66286d84c37a1b937e0b303713e94.zip |
Fix bug #365137: allow to build on systems without O_CLOEXEC
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/logrotate/files')
-rw-r--r-- | app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch b/app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch new file mode 100644 index 000000000000..367f396d0734 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch @@ -0,0 +1,24 @@ +diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN logrotate-3.7.9.orig//config.c logrotate-3.7.9/config.c +--- logrotate-3.7.9.orig//config.c 2010-06-28 04:04:56.000000000 -0400 ++++ logrotate-3.7.9/config.c 2011-04-28 19:16:55.422051174 -0400 +@@ -514,12 +514,19 @@ static int readConfigFile(const char *co + .l_whence = SEEK_SET, + .l_type = F_RDLCK + }; ++ int flags; + + /* FIXME: createOwner and createGroup probably shouldn't be fixed + length arrays -- of course, if we aren't run setuid it doesn't + matter much */ + +- fd = open(configFile, O_RDONLY | O_CLOEXEC); ++#ifdef O_CLOEXEC ++ flags = O_RDONLY | O_CLOEXEC; ++#else ++ flags = O_RDONLY; ++#endif ++ ++ fd = open(configFile, flags); + if (fd < 0) { + message(MESS_ERROR, "failed to open config file %s: %s\n", + configFile, strerror(errno)); |