Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6be49f2

Browse files
committed
Fix unportable coding in tarCreateHeader().
uid_t and gid_t might be wider than int on some platforms.Per buildfarm member brolga.
1 parentd5a43a2 commit6be49f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/port/tar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ tarCreateHeader(char *h, const char *filename, const char *linktarget,
8181
sprintf(&h[100],"%07o ", (int)mode);
8282

8383
/* User ID 8 */
84-
sprintf(&h[108],"%07o ",uid);
84+
sprintf(&h[108],"%07o ",(int)uid);
8585

8686
/* Group 8 */
87-
sprintf(&h[116],"%07o ",gid);
87+
sprintf(&h[116],"%07o ",(int)gid);
8888

8989
/* File size 12 - 11 digits, 1 space; use print_val for 64 bit support */
9090
if (linktarget!=NULL||S_ISDIR(mode))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp