]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rds: prepare support to kernel 2.6.39-200.1.1.el5uek: add the macro NIPQUAD_*
authorDotan Barak <dotanb@dev.mellanox.co.il>
Tue, 3 Jul 2012 08:29:51 +0000 (11:29 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:36 +0000 (16:41 -0700)
Add the macro:
  NIPQUAD
  NIPQUAD_FMT

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
net/rds/tcp.h

index f5e6f7bebb5013acbf6b74fe76faf44ab391bfcb..9421ad4b9100ca62c5424d5396b07a37abcc682f 100644 (file)
@@ -87,4 +87,16 @@ DECLARE_PER_CPU(struct rds_tcp_statistics, rds_tcp_stats);
 unsigned int rds_tcp_stats_info_copy(struct rds_info_iterator *iter,
                                     unsigned int avail);
 
+#ifndef NIPQUAD
+#define NIPQUAD(addr) \
+       ((unsigned char *)&(addr))[0], \
+       ((unsigned char *)&(addr))[1], \
+       ((unsigned char *)&(addr))[2], \
+       ((unsigned char *)&(addr))[3]
+#endif
+
+#ifndef NIPQUAD_FMT
+#define NIPQUAD_FMT "%u.%u.%u.%u"
+#endif
+
 #endif