Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix build on i386 platform.
Vsevolod Stakhov committed 13 years ago
commit 3b6cac4fe92ed45a1c5e9c11b22916e2f9b11c13
parent 09af313
2 files changed +4 -2
modified libpkg/fetch.c
@@ -181,7 +181,7 @@ start_ssh(struct pkg_fetch *f, struct url *u, off_t *sz)
		}
	}

-
	fprintf(f->ssh, "get %s %ld\n", u->doc, u->ims_time);
+
	fprintf(f->ssh, "get %s %" PRIdMAX "\n", u->doc, (intmax_t)u->ims_time);
	if ((linelen = getline(&line, &linecap, f->ssh)) > 0) {
		if (line[linelen -1 ] == '\n')
			line[linelen -1 ] = '\0';
modified libpkg/ssh.c
@@ -24,10 +24,12 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>

#include <ctype.h>
+
#include <inttypes.h>
#define _WITH_GETLINE
#include <stdio.h>
#include <string.h>
@@ -129,7 +131,7 @@ pkg_sshserve(void)
			continue;
		}

-
		printf("ok: %ld\n", st.st_size);
+
		printf("ok: %" PRIdMAX "\n", (intmax_t)st.st_size);
		f = fopen(file, "r");

		while ((r = fread(buf, 1, sizeof(buf), f)) > 0)