Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Yusei Tahara
slapos
Commits
3a6a5aed
Commit
3a6a5aed
authored
Jul 12, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix logroate compilation on older kernels.
Sometimes O_CLOEXEC is not available.
parent
864764fa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
component/logrotate/buildout.cfg
component/logrotate/buildout.cfg
+10
-0
component/logrotate/logrotate-3.7.9-O_CLOEXEC.optional.patch
component/logrotate/logrotate-3.7.9-O_CLOEXEC.optional.patch
+16
-0
No files found.
component/logrotate/buildout.cfg
View file @
3a6a5aed
...
...
@@ -3,10 +3,20 @@ extends =
../popt/buildout.cfg
parts = logrotate
[logrotate-3.7.9-O_CLOEXEC.optional.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum = 6beac248c978b767d4bccc1b7eebe6bd
filename = ${:_buildout_section_name_}
[logrotate]
recipe = hexagonit.recipe.cmmi
url = https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.7.9.tar.gz
md5sum = eeba9dbca62a9210236f4b83195e4ea5
patch-options = -p1
patches =
${logrotate-3.7.9-O_CLOEXEC.optional.patch:location}/${logrotate-3.7.9-O_CLOEXEC.optional.patch:filename}
configure-command = true
make-options = PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
environment =
...
...
component/logrotate/logrotate-3.7.9-O_CLOEXEC.optional.patch
0 → 100644
View file @
3a6a5aed
diff --git a/config.c b/config.c
index e6d5d1d..dd004a9 100644
--- a/config.c
+++ b/config.c
@@ -519,7 +519,11 @@
static int readConfigFile(const char *configFile, struct logInfo *defConfig)
length arrays -- of course, if we aren't run setuid it doesn't
matter much */
+#ifdef O_CLOEXEC
fd = open(configFile, O_RDONLY | O_CLOEXEC);
+#else
+ fd = open(configFile, O_RDONLY);
+#endif
if (fd < 0) {
message(MESS_ERROR, "failed to open config file %s: %s\n",
configFile, strerror(errno));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment