summaryrefslogtreecommitdiffstats
path: root/Documentation/networking/timestamping/timestamping.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-03-12 19:23:27 +0000
committerDavid S. Miller <davem@davemloft.net>2010-03-15 16:00:46 -0700
commitf28f9e43b3d81d1e69da0ebf77c8a6780cb5e0c8 (patch)
tree691df61b8d3456f1e952df04926f09b91827b39b /Documentation/networking/timestamping/timestamping.c
parent876e956f207373f974f2808c36aabcd4e32c9ee4 (diff)
timestamping: fix example build
Fix Makefiles so that Documentation/networking/timestamping/timestamping.c will build when using the CONFIG_BUILD_DOCSRC kconfig option. (timestamping.c does not build currently with its simple Makefile.) Also fix printf format warnings. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking/timestamping/timestamping.c')
-rw-r--r--Documentation/networking/timestamping/timestamping.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c
index a7936fe8444..7b81d169cb0 100644
--- a/Documentation/networking/timestamping/timestamping.c
+++ b/Documentation/networking/timestamping/timestamping.c
@@ -41,9 +41,9 @@
#include <arpa/inet.h>
#include <net/if.h>
-#include "asm/types.h"
-#include "linux/net_tstamp.h"
-#include "linux/errqueue.h"
+#include <asm/types.h>
+#include <linux/net_tstamp.h>
+#include <linux/errqueue.h>
#ifndef SO_TIMESTAMPING
# define SO_TIMESTAMPING 37
@@ -164,7 +164,7 @@ static void printpacket(struct msghdr *msg, int res,
gettimeofday(&now, 0);
- printf("%ld.%06ld: received %s data, %d bytes from %s, %d bytes control messages\n",
+ printf("%ld.%06ld: received %s data, %d bytes from %s, %zu bytes control messages\n",
(long)now.tv_sec, (long)now.tv_usec,
(recvmsg_flags & MSG_ERRQUEUE) ? "error" : "regular",
res,
@@ -173,7 +173,7 @@ static void printpacket(struct msghdr *msg, int res,
for (cmsg = CMSG_FIRSTHDR(msg);
cmsg;
cmsg = CMSG_NXTHDR(msg, cmsg)) {
- printf(" cmsg len %d: ", cmsg->cmsg_len);
+ printf(" cmsg len %zu: ", cmsg->cmsg_len);
switch (cmsg->cmsg_level) {
case SOL_SOCKET:
printf("SOL_SOCKET ");