Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188133
b: refs/heads/master
c: f28f9e4
h: refs/heads/master
i:
  188131: 7959b78
v: v3
  • Loading branch information
Randy Dunlap authored and David S. Miller committed Mar 15, 2010
1 parent 3396d57 commit b0ba845
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 876e956f207373f974f2808c36aabcd4e32c9ee4
refs/heads/master: f28f9e43b3d81d1e69da0ebf77c8a6780cb5e0c8
2 changes: 2 additions & 0 deletions trunk/Documentation/networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ hostprogs-y := ifenslave

# Tell kbuild to always build the programs
always := $(hostprogs-y)

obj-m := timestamping/
11 changes: 9 additions & 2 deletions trunk/Documentation/networking/timestamping/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CPPFLAGS = -I../../../include
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

timestamping: timestamping.c
# List of programs to build
hostprogs-y := timestamping

# Tell kbuild to always build the programs
always := $(hostprogs-y)

HOSTCFLAGS_timestamping.o += -I$(objtree)/usr/include

clean:
rm -f timestamping
10 changes: 5 additions & 5 deletions trunk/Documentation/networking/timestamping/timestamping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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 ");
Expand Down

0 comments on commit b0ba845

Please sign in to comment.