Skip to content

Commit

Permalink
build: fix sparc build
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Nov 19, 2010
1 parent af29137 commit 31b81f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ring.c
Expand Up @@ -332,6 +332,7 @@ static void knet_recv_frame(knet_handle_t knet_h, int sockfd)
struct knet_host *i;
struct knet_link *j, *link_src;
suseconds_t latency_last;
struct timespec pong;

if (pthread_rwlock_rdlock(&knet_h->list_rwlock) != 0)
return;
Expand Down Expand Up @@ -380,8 +381,8 @@ static void knet_recv_frame(knet_handle_t knet_h, int sockfd)
case KNET_FRAME_PONG:
clock_gettime(CLOCK_MONOTONIC, &j->pong_last);

knet_tsdiff((struct timespec *) (knet_h->databuf + 1),
&j->pong_last, &latency_last);
memcpy(&pong, knet_h->databuf + 1, sizeof(struct timespec));
knet_tsdiff(&pong, &j->pong_last, &latency_last);

if (latency_last < j->pong_timeout)
j->enabled = 1; /* TODO: might need write lock */
Expand Down
2 changes: 1 addition & 1 deletion vty_cli_cmds.c
Expand Up @@ -1207,7 +1207,7 @@ static int knet_cmd_write_conf(struct knet_vty *vty)
backup = 0;

fd = open(knet_cfg_head.conffile,
O_RDWR | O_CREAT | O_CLOEXEC | O_EXCL | O_TRUNC,
O_RDWR | O_CREAT | O_EXCL | O_TRUNC,
S_IRUSR | S_IWUSR);
if (fd < 0) {
knet_vty_write(vty, "Error unable to open file%s", telnet_newline);
Expand Down

0 comments on commit 31b81f1

Please sign in to comment.