aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-02-16 20:01:21 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-02-16 20:01:21 -0500
commit6be49f22f476e5fadf1934cf67f08b12239febdf (patch)
treec193d8207c4abe475ed2adbe402bae8a62534088
parentd5a43a238e8179ef4d808acb920bdb7e8c1e3596 (diff)
downloadpostgresql-6be49f22f476e5fadf1934cf67f08b12239febdf.tar.gz
postgresql-6be49f22f476e5fadf1934cf67f08b12239febdf.zip
Fix unportable coding in tarCreateHeader().
uid_t and gid_t might be wider than int on some platforms. Per buildfarm member brolga.
-rw-r--r--src/port/tar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port/tar.c b/src/port/tar.c
index 33b488464f2..09fd6c10d34 100644
--- a/src/port/tar.c
+++ b/src/port/tar.c
@@ -81,10 +81,10 @@ tarCreateHeader(char *h, const char *filename, const char *linktarget,
sprintf(&h[100], "%07o ", (int) mode);
/* User ID 8 */
- sprintf(&h[108], "%07o ", uid);
+ sprintf(&h[108], "%07o ", (int) uid);
/* Group 8 */
- sprintf(&h[116], "%07o ", gid);
+ sprintf(&h[116], "%07o ", (int) gid);
/* File size 12 - 11 digits, 1 space; use print_val for 64 bit support */
if (linktarget != NULL || S_ISDIR(mode))