From 449c161202210d130987e0e739135343d685eb68 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 15:21:09 +0000 Subject: [PATCH] Fix compilation error on amd64. Reported by: stefanf MFC after: 2 weeks --- usr.sbin/services_mkdb/services_mkdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/services_mkdb/services_mkdb.c b/usr.sbin/services_mkdb/services_mkdb.c index 8cc97ea14229..f4cf62ac414f 100644 --- a/usr.sbin/services_mkdb/services_mkdb.c +++ b/usr.sbin/services_mkdb/services_mkdb.c @@ -219,7 +219,7 @@ parseservices(const char *fname, StringList *sl) line = 0; if ((svc = calloc(PMASK + 1, sizeof(StringList **))) == NULL) - err(1, "Cannot allocate %zu bytes", PMASK + 1); + err(1, "Cannot allocate %zu bytes", (size_t)(PMASK + 1)); /* XXX: change NULL to "\0\0#" when fparseln fixed */ for (; (p = fparseln(fp, &len, &line, NULL, 0)) != NULL; free(p)) { @@ -271,7 +271,8 @@ parseservices(const char *fname, StringList *sl) if (svc[pnum] == NULL) { svc[pnum] = calloc(PROTOMAX, sizeof(StringList *)); if (svc[pnum] == NULL) - err(1, "Cannot allocate %zu bytes", PROTOMAX); + err(1, "Cannot allocate %zu bytes", + (size_t)PROTOMAX); } pindex = getprotoindex(sl, proto);