mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
Fix nscd/cachedumper.c compile errors
This commit is contained in:
parent
4315f45c93
commit
28b4928b1b
@ -26,6 +26,7 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "nscd.h"
|
#include "nscd.h"
|
||||||
#include "dbg_log.h"
|
#include "dbg_log.h"
|
||||||
@ -137,8 +138,8 @@ nscd_print_cache (const char *name)
|
|||||||
data_string (key, "", here->len);
|
data_string (key, "", here->len);
|
||||||
|
|
||||||
struct datahead *dh = (struct datahead *) (data + here->packet);
|
struct datahead *dh = (struct datahead *) (data + here->packet);
|
||||||
printf ("\" (len:%d) Data %08lx\n", here->len,
|
printf ("\" (len:%ld) Data %08lx\n", (long) here->len,
|
||||||
(char *) dh - (char *) the_cache);
|
(long unsigned int) ((char *) dh - (char *) the_cache));
|
||||||
|
|
||||||
if (debug_level > 0)
|
if (debug_level > 0)
|
||||||
{
|
{
|
||||||
@ -256,8 +257,9 @@ nscd_print_cache (const char *name)
|
|||||||
case GETAI:
|
case GETAI:
|
||||||
{
|
{
|
||||||
ai_response_header *ai = &(dh->data[0].aidata);
|
ai_response_header *ai = &(dh->data[0].aidata);
|
||||||
printf (" naddrs %d addrslen %d canonlen %d error %d [",
|
printf (" naddrs %ld addrslen %ld canonlen %ld error %d [",
|
||||||
ai->naddrs, ai->addrslen, ai->canonlen, ai->error);
|
(long) ai->naddrs, (long) ai->addrslen,
|
||||||
|
(long) ai->canonlen, ai->error);
|
||||||
cp += sizeof (*ai);
|
cp += sizeof (*ai);
|
||||||
unsigned char *addrs = cp;
|
unsigned char *addrs = cp;
|
||||||
unsigned char *families = cp + ai->addrslen;
|
unsigned char *families = cp + ai->addrslen;
|
||||||
@ -305,8 +307,8 @@ nscd_print_cache (const char *name)
|
|||||||
case GETSERVBYPORT:
|
case GETSERVBYPORT:
|
||||||
{
|
{
|
||||||
serv_response_header *serv = &(dh->data[0].servdata);
|
serv_response_header *serv = &(dh->data[0].servdata);
|
||||||
printf (" alias_cnt %d port %d (stored as %d)",
|
printf (" alias_cnt %ld port %d (stored as %d)",
|
||||||
serv->s_aliases_cnt,
|
(long) serv->s_aliases_cnt,
|
||||||
((serv->s_port & 0xff00) >> 8) | ((serv->
|
((serv->s_port & 0xff00) >> 8) | ((serv->
|
||||||
s_port & 0xff) <<
|
s_port & 0xff) <<
|
||||||
8), serv->s_port);
|
8), serv->s_port);
|
||||||
|
Loading…
Reference in New Issue
Block a user