diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-13 21:07:08 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-13 21:07:08 +0000 |
commit | bce890ffc7726b373bc7acbfe47d7caf6d0f11b7 (patch) | |
tree | a99058ccac415b84b484541314a2198fc1810e9f | |
parent | 54377c6a032421de24ee5d39a2fa8b5a857dfc1b (diff) |
Fix building on newer systems which require a third arg to open() when using O_CREAT.
Issue 11238, reported by puzzled.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89254 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_iax2.c | 2 | ||||
-rw-r--r-- | channels/chan_zap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index d5d711465..7b68001dc 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1569,7 +1569,7 @@ static int try_firmware(char *s) ast_log(LOG_WARNING, "Cannot open '%s': %s\n", s, strerror(errno)); return -1; } - fd = open(s2, O_RDWR | O_CREAT | O_EXCL); + fd = open(s2, O_RDWR | O_CREAT | O_EXCL, 0600); if (fd < 0) { ast_log(LOG_WARNING, "Cannot open '%s' for writing: %s\n", s2, strerror(errno)); close(ifd); diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 11165ae04..0450a2a8c 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -9479,7 +9479,7 @@ static int handle_pri_set_debug_file(int fd, int argc, char **argv) if (ast_strlen_zero(argv[4])) return RESULT_SHOWUSAGE; - myfd = open(argv[4], O_CREAT|O_WRONLY); + myfd = open(argv[4], O_CREAT|O_WRONLY, 0600); if (myfd < 0) { ast_cli(fd, "Unable to open '%s' for writing\n", argv[4]); return RESULT_SUCCESS; |