diff options
| author | Ulf Hermann <[email protected]> | 2017-05-04 17:53:48 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-05-08 12:08:46 +0000 |
| commit | 7393feccdc7726f9720677c6327da28f509af20e (patch) | |
| tree | 14b1a95db81c6f0dbf6dba81a726f2b84575bb98 /src/elfcompress.c | |
| parent | 5330df77490e15d23f27cdfe06e3374b0d9086f8 (diff) | |
Use octal numbers rather than permission macros
The permission macros are not guaranteed to be defined and the octal
numbers are rather well known.
Change-Id: I90ea2f98013f963857946a2f150a4a7114ca2b9a
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/elfcompress.c')
| -rw-r--r-- | src/elfcompress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elfcompress.c b/src/elfcompress.c index 5dbeb576..6080db71 100644 --- a/src/elfcompress.c +++ b/src/elfcompress.c @@ -542,7 +542,7 @@ process_file (const char *fname) else { fnew = xstrdup (foutput); - fdnew = open (fnew, O_WRONLY | O_BINARY | O_CREAT, st.st_mode & ALLPERMS); + fdnew = open (fnew, O_WRONLY | O_BINARY | O_CREAT, st.st_mode & 07777); } if (fdnew < 0) @@ -1237,7 +1237,7 @@ process_file (const char *fname) #if HAVE_DECL_FCHMOD /* Try to match mode and owner.group of the original file. */ - if (fchmod (fdnew, st.st_mode & ALLPERMS) != 0) + if (fchmod (fdnew, st.st_mode & 07777) != 0) if (verbose >= 0) error (0, errno, "Couldn't fchmod %s", fnew); #endif |
