Skip to contentSkip to conversation

Fix compile issue with CONFIG_CHECKPOINT=n for inet sockets

PATCH Applied Matt Helsley 3 participants 4 messages Oct 2, 2009 2 messages not in the archive Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix compile issue with CONFIG_CHECKPOINT=n for inet sockets

When I disable CHECKPOINT I get:

net/ipv4/af_inet.c:860: error: ‘inet_checkpoint’ undeclared here (not in a function) net/ipv4/af_inet.c:861: error: ‘inet_restore’ undeclared here (not in a function) net/ipv4/af_inet.c:862: error: ‘inet_collect’ undeclared here (not in a function)

Similar to problem with unix sockets. The solution is the same as well.

---
 include/net/inet_common.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/net/inet_common.h +4 -0
index 7ade732..bf04e6e 100644
@@ -52,6 +52,10 @@ extern int inet_checkpoint(struct ckpt_ctx *ctx, struct socket *sock);
 extern int inet_collect(struct ckpt_ctx *ctx, struct socket *sock);
 extern int inet_restore(struct ckpt_ctx *cftx, struct socket *sock,
 			struct ckpt_hdr_socket *h);
+#else
+#define inet_checkpoint NULL
+#define inet_collect NULL
+#define inet_restore NULL
 #endif /* CONFIG_CHECKPOINT */
 
 static inline void inet_ctl_sock_destroy(struct sock *sk)
Signature · 6 lines
1.5.6.3

_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers
Applied
#5 lore raw
In reply to a message not in the archive

Queued to ckpt-v18-dev.

Quoted 19 lines · Matt Helsley

When I disable CHECKPOINT I get:

net/ipv4/af_inet.c:860: error: ‘inet_checkpoint’ undeclared here (not in a function) net/ipv4/af_inet.c:861: error: ‘inet_restore’ undeclared here (not in a function) net/ipv4/af_inet.c:862: error: ‘inet_collect’ undeclared here (not in a function)

Similar to problem with unix sockets. The solution is the same as well.

---
 include/net/inet_common.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/net/inet_common.h +0 -0
index 7ade732..bf04e6e 100644

include/net/inet_common.h extern int inet_checkpoint(struct ckpt_ctx *ctx, struct socket *sock); · line 61

Quoted 10 lines
include/net/inet_common.h +4 -0
@@ -52,6 +52,10 @@ extern int inet_checkpoint(struct ckpt_ctx *ctx, struct socket *sock);
 extern int inet_collect(struct ckpt_ctx *ctx, struct socket *sock);
 extern int inet_restore(struct ckpt_ctx *cftx, struct socket *sock,
 			struct ckpt_hdr_socket *h);
+#else
+#define inet_checkpoint NULL
+#define inet_collect NULL
+#define inet_restore NULL
 #endif /* CONFIG_CHECKPOINT */
 
 static inline void inet_ctl_sock_destroy(struct sock *sk)

_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

#4 lore raw
In reply to a message not in the archive
Quoted 3 lines · Dan Smith

MH> Similar to problem with unix sockets. The solution is the same as well.

Indeed, sorry about that.

No problem. I noticed Serge testing this config earlier and thought I should test my own patches with it again..

Cheers,
-Matt Helsley