From: Ben Pfaff Date: Thu, 4 Sep 2008 20:28:28 +0000 (-0700) Subject: Don't use designated struct member initializers in code compiled outside of Linux. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66f51290ba619f4c3b340c7bd6aedd61f41dd9ea;p=openvswitch Don't use designated struct member initializers in code compiled outside of Linux. Needed for partner builds. --- diff --git a/lib/vconn-netlink.c b/lib/vconn-netlink.c index 22a8f61f..aabd01ba 100644 --- a/lib/vconn-netlink.c +++ b/lib/vconn-netlink.c @@ -142,10 +142,12 @@ netlink_wait(struct vconn *vconn, enum vconn_wait_type wait) } struct vconn_class netlink_vconn_class = { - .name = "nl", - .open = netlink_open, - .close = netlink_close, - .recv = netlink_recv, - .send = netlink_send, - .wait = netlink_wait, + "nl", /* name */ + netlink_open, /* open */ + netlink_close, /* close */ + NULL, /* connect */ + NULL, /* accept */ + netlink_recv, /* recv */ + netlink_send, /* send */ + netlink_wait, /* wait */ }; diff --git a/lib/vconn-ssl.c b/lib/vconn-ssl.c index 40bee797..fbf1a714 100644 --- a/lib/vconn-ssl.c +++ b/lib/vconn-ssl.c @@ -652,13 +652,14 @@ ssl_wait(struct vconn *vconn, enum vconn_wait_type wait) } struct vconn_class ssl_vconn_class = { - .name = "ssl", - .open = ssl_open, - .close = ssl_close, - .connect = ssl_connect, - .recv = ssl_recv, - .send = ssl_send, - .wait = ssl_wait, + "ssl", /* name */ + ssl_open, /* open */ + ssl_close, /* close */ + ssl_connect, /* connect */ + NULL, /* accept */ + ssl_recv, /* recv */ + ssl_send, /* send */ + ssl_wait, /* wait */ }; /* Passive SSL. */ @@ -787,11 +788,14 @@ pssl_wait(struct vconn *vconn, enum vconn_wait_type wait) } struct vconn_class pssl_vconn_class = { - .name = "pssl", - .open = pssl_open, - .close = pssl_close, - .accept = pssl_accept, - .wait = pssl_wait, + "pssl", /* name */ + pssl_open, /* open */ + pssl_close, /* close */ + NULL, /* connect */ + pssl_accept, /* accept */ + NULL, /* recv */ + NULL, /* send */ + pssl_wait, /* wait */ }; /* diff --git a/lib/vconn-stream.c b/lib/vconn-stream.c index 0f7220e2..83795097 100644 --- a/lib/vconn-stream.c +++ b/lib/vconn-stream.c @@ -246,12 +246,14 @@ stream_wait(struct vconn *vconn, enum vconn_wait_type wait) } static struct vconn_class stream_vconn_class = { - .name = "stream", - .close = stream_close, - .connect = stream_connect, - .recv = stream_recv, - .send = stream_send, - .wait = stream_wait, + "stream", /* name */ + NULL, /* open */ + stream_close, /* close */ + stream_connect, /* connect */ + NULL, /* accept */ + stream_recv, /* recv */ + stream_send, /* send */ + stream_wait, /* wait */ }; /* Passive stream socket vconn. */ @@ -349,8 +351,12 @@ pstream_wait(struct vconn *vconn, enum vconn_wait_type wait) } static struct vconn_class pstream_vconn_class = { - .name = "pstream", - .close = pstream_close, - .accept = pstream_accept, - .wait = pstream_wait + "pstream", /* name */ + NULL, /* open */ + pstream_close, /* close */ + NULL, /* connect */ + pstream_accept, /* accept */ + NULL, /* recv */ + NULL, /* send */ + pstream_wait /* wait */ }; diff --git a/lib/vconn-tcp.c b/lib/vconn-tcp.c index 4a798c5f..3d336c46 100644 --- a/lib/vconn-tcp.c +++ b/lib/vconn-tcp.c @@ -127,8 +127,14 @@ tcp_open(const char *name, char *suffix, struct vconn **vconnp) } struct vconn_class tcp_vconn_class = { - .name = "tcp", - .open = tcp_open, + "tcp", /* name */ + tcp_open, /* open */ + NULL, /* close */ + NULL, /* connect */ + NULL, /* accept */ + NULL, /* recv */ + NULL, /* send */ + NULL, /* wait */ }; /* Passive TCP. */ @@ -189,7 +195,13 @@ ptcp_accept(int fd, const struct sockaddr *sa, size_t sa_len, } struct vconn_class ptcp_vconn_class = { - .name = "ptcp", - .open = ptcp_open, + "ptcp", /* name */ + ptcp_open, /* open */ + NULL, /* close */ + NULL, /* connect */ + NULL, /* accept */ + NULL, /* recv */ + NULL, /* send */ + NULL, /* wait */ }; diff --git a/lib/vconn-unix.c b/lib/vconn-unix.c index a321b3ce..1dcba262 100644 --- a/lib/vconn-unix.c +++ b/lib/vconn-unix.c @@ -82,8 +82,14 @@ unix_open(const char *name, char *suffix, struct vconn **vconnp) } struct vconn_class unix_vconn_class = { - .name = "unix", - .open = unix_open, + "unix", /* name */ + unix_open, /* open */ + NULL, /* close */ + NULL, /* connect */ + NULL, /* accept */ + NULL, /* recv */ + NULL, /* send */ + NULL, /* wait */ }; /* Passive UNIX socket. */ @@ -123,7 +129,13 @@ punix_accept(int fd, const struct sockaddr *sa, size_t sa_len, } struct vconn_class punix_vconn_class = { - .name = "punix", - .open = punix_open, + "punix", /* name */ + punix_open, /* open */ + NULL, /* close */ + NULL, /* connect */ + NULL, /* accept */ + NULL, /* recv */ + NULL, /* send */ + NULL, /* wait */ };