aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2020-03-14 00:21:40 -0400
committerDJ Delorie <dj@redhat.com>2020-03-16 02:13:36 -0400
commit28b4928b1b1735bcacafb2f2e6a928020154a09b (patch)
tree2ae25344c9bf13347a1d0a02d4e7dd32b0e89055 /nscd
parent4315f45c930c9d4f2beb3aeec859e4d6cf02c918 (diff)
downloadglibc-28b4928b1b1735bcacafb2f2e6a928020154a09b.zip
glibc-28b4928b1b1735bcacafb2f2e6a928020154a09b.tar.gz
glibc-28b4928b1b1735bcacafb2f2e6a928020154a09b.tar.bz2
Fix nscd/cachedumper.c compile errors
Diffstat (limited to 'nscd')
-rw-r--r--nscd/cachedumper.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/nscd/cachedumper.c b/nscd/cachedumper.c
index c5bd370..4c314e0 100644
--- a/nscd/cachedumper.c
+++ b/nscd/cachedumper.c
@@ -26,6 +26,7 @@
#include <sys/mman.h>
#include <arpa/inet.h>
#include <getopt.h>
+#include <sys/param.h>
#include "nscd.h"
#include "dbg_log.h"
@@ -137,8 +138,8 @@ nscd_print_cache (const char *name)
data_string (key, "", here->len);
struct datahead *dh = (struct datahead *) (data + here->packet);
- printf ("\" (len:%d) Data %08lx\n", here->len,
- (char *) dh - (char *) the_cache);
+ printf ("\" (len:%ld) Data %08lx\n", (long) here->len,
+ (long unsigned int) ((char *) dh - (char *) the_cache));
if (debug_level > 0)
{
@@ -256,8 +257,9 @@ nscd_print_cache (const char *name)
case GETAI:
{
ai_response_header *ai = &(dh->data[0].aidata);
- printf (" naddrs %d addrslen %d canonlen %d error %d [",
- ai->naddrs, ai->addrslen, ai->canonlen, ai->error);
+ printf (" naddrs %ld addrslen %ld canonlen %ld error %d [",
+ (long) ai->naddrs, (long) ai->addrslen,
+ (long) ai->canonlen, ai->error);
cp += sizeof (*ai);
unsigned char *addrs = cp;
unsigned char *families = cp + ai->addrslen;
@@ -305,8 +307,8 @@ nscd_print_cache (const char *name)
case GETSERVBYPORT:
{
serv_response_header *serv = &(dh->data[0].servdata);
- printf (" alias_cnt %d port %d (stored as %d)",
- serv->s_aliases_cnt,
+ printf (" alias_cnt %ld port %d (stored as %d)",
+ (long) serv->s_aliases_cnt,
((serv->s_port & 0xff00) >> 8) | ((serv->
s_port & 0xff) <<
8), serv->s_port);